/*
 * Copyright(c) 2011 Sencha Inc. licensing@sencha.com
 */
Ext.define("Ext.util.Observable", {
	requires : [ "Ext.util.Event" ],
	statics : {
		releaseCapture : function(a) {
			a.fireEvent = this.prototype.fireEvent
		},
		capture : function(c, b, a) {
			c.fireEvent = Ext.Function.createInterceptor(c.fireEvent, b, a)
		},
		observe : function(a, b) {
			if (a) {
				if (!a.isObservable) {
					Ext.applyIf(a, new this());
					this.capture(a.prototype, a.fireEvent, a)
				}
				if (Ext.isObject(b)) {
					a.on(b)
				}
				return a
			}
		}
	},
	isObservable : true,
	constructor : function(a) {
		var b = this;
		Ext.apply(b, a);
		if (b.listeners) {
			b.on(b.listeners);
			delete b.listeners
		}
		b.events = b.events || {};
		if (b.bubbleEvents) {
			b.enableBubble(b.bubbleEvents)
		}
	},
	eventOptionsRe : /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal)$/,
	addManagedListener : function(h, d, f, e, c) {
		var g = this, a = g.managedListeners = g.managedListeners || [], b;
		if (Ext.isObject(d)) {
			c = d;
			for (d in c) {
				if (c.hasOwnProperty(d)) {
					b = c[d];
					if (!g.eventOptionsRe.test(d)) {
						g.addManagedListener(h, d, b.fn || b, b.scope || c.scope, b.fn ? b : c)
					}
				}
			}
		} else {
			a.push( {
				item : h,
				ename : d,
				fn : f,
				scope : e,
				options : c
			});
			h.on(d, f, e, c)
		}
	},
	removeManagedListener : function(j, d, g, k) {
		var f = this, l, c, h, b, a, e;
		if (Ext.isObject(d)) {
			l = d;
			for (d in l) {
				if (l.hasOwnProperty(d)) {
					c = l[d];
					if (!f.eventOptionsRe.test(d)) {
						f.removeManagedListener(j, d, c.fn || c, c.scope || l.scope)
					}
				}
			}
		}
		h = f.managedListeners ? f.managedListeners.slice() : [];
		a = h.length;
		for (e = 0; e < a; e++) {
			b = h[e];
			if (b.item === j && b.ename === d && (!g || b.fn === g) && (!k || b.scope === k)) {
				Ext.Array.remove(f.managedListeners, b);
				j.un(b.ename, b.fn, b.scope)
			}
		}
	},
	fireEvent : function() {
		var g = this, c = Ext.Array.toArray(arguments), d = c[0].toLowerCase(), b = true, f = g.events[d], a = g.eventQueue, e;
		if (g.eventsSuspended === true) {
			if (a) {
				a.push(c)
			}
		} else {
			if (f && Ext.isObject(f) && f.bubble) {
				if (f.fire.apply(f, c.slice(1)) === false) {
					return false
				}
				e = g.getBubbleTarget && g.getBubbleTarget();
				if (e && e.isObservable) {
					if (!e.events[d] || !Ext.isObject(e.events[d]) || !e.events[d].bubble) {
						e.enableBubble(d)
					}
					return e.fireEvent.apply(e, c)
				}
			} else {
				if (f && Ext.isObject(f)) {
					c.shift();
					b = f.fire.apply(f, c)
				}
			}
		}
		return b
	},
	addListener : function(c, e, d, b) {
		var g = this, a, f;
		if (Ext.isObject(c)) {
			b = c;
			for (c in b) {
				if (b.hasOwnProperty(c)) {
					a = b[c];
					if (!g.eventOptionsRe.test(c)) {
						g.addListener(c, a.fn || a, a.scope || b.scope, a.fn ? a : b)
					}
				}
			}
		} else {
			c = c.toLowerCase();
			g.events[c] = g.events[c] || true;
			f = g.events[c] || true;
			if (Ext.isBoolean(f)) {
				g.events[c] = f = new Ext.util.Event(g, c)
			}
			f.addListener(e, d, Ext.isObject(b) ? b : {})
		}
	},
	removeListener : function(c, e, d) {
		var g = this, b, f, a;
		if (Ext.isObject(c)) {
			a = c;
			for (c in a) {
				if (a.hasOwnProperty(c)) {
					b = a[c];
					if (!g.eventOptionsRe.test(c)) {
						g.removeListener(c, b.fn || b, b.scope || a.scope)
					}
				}
			}
		} else {
			c = c.toLowerCase();
			f = g.events[c];
			if (f.isEvent) {
				f.removeListener(e, d)
			}
		}
	},
	clearListeners : function() {
		var b = this.events, c, a;
		for (a in b) {
			if (b.hasOwnProperty(a)) {
				c = b[a];
				if (c.isEvent) {
					c.clearListeners()
				}
			}
		}
		this.clearManagedListeners()
	},
	clearManagedListeners : function() {
		var c = this.managedListeners || [], d = 0, b = c.length, a;
		for (; d < b; d++) {
			a = c[d];
			a.item.un(a.ename, a.fn, a.scope)
		}
		this.managedListeners = []
	},
	addEvents : function(e) {
		var d = this, b, a, c;
		d.events = d.events || {};
		if (Ext.isString(e)) {
			b = arguments;
			c = b.length;
			while (c--) {
				d.events[b[c]] = d.events[b[c]] || true
			}
		} else {
			Ext.applyIf(d.events, e)
		}
	},
	hasListener : function(a) {
		var b = this.events[a.toLowerCase()];
		return b && b.isEvent === true && b.listeners.length > 0
	},
	suspendEvents : function(a) {
		this.eventsSuspended = true;
		if (a && !this.eventQueue) {
			this.eventQueue = []
		}
	},
	resumeEvents : function() {
		var a = this, b = a.eventQueue || [];
		a.eventsSuspended = false;
		delete a.eventQueue;
		Ext.each(b, function(c) {
			a.fireEvent.apply(a, c)
		})
	},
	relayEvents : function(c, e, h) {
		h = h || "";
		var g = this, a = e.length, d = 0, f, b;
		for (; d < a; d++) {
			f = e[d].substr(h.length);
			b = h + f;
			g.events[b] = g.events[b] || true;
			c.on(f, g.createRelayer(b))
		}
	},
	createRelayer : function(a) {
		var b = this;
		return function() {
			return b.fireEvent.apply(b, [ a ].concat(Array.prototype.slice.call(arguments, 0, -1)))
		}
	},
	enableBubble : function(a) {
		var b = this;
		if (!Ext.isEmpty(a)) {
			a = Ext.isArray(a) ? a : Ext.Array.toArray(arguments);
			Ext.each(a, function(c) {
				c = c.toLowerCase();
				var d = b.events[c] || true;
				if (Ext.isBoolean(d)) {
					d = new Ext.util.Event(b, c);
					b.events[c] = d
				}
				d.bubble = true
			})
		}
	}
}, function() {
	this.createAlias( {
		on : "addListener",
		un : "removeListener",
		mon : "addManagedListener",
		mun : "removeManagedListener"
	});
	this.observeClass = this.observe;
	Ext.apply(Ext.util.Observable.prototype, function() {
		function a(i) {
			var h = (this.methodEvents = this.methodEvents || {})[i], d, c, f, g = this;
			if (!h) {
				this.methodEvents[i] = h = {};
				h.originalFn = this[i];
				h.methodName = i;
				h.before = [];
				h.after = [];
				var b = function(k, j, e) {
					if ((c = k.apply(j || g, e)) !== undefined) {
						if (typeof c == "object") {
							if (c.returnValue !== undefined) {
								d = c.returnValue
							} else {
								d = c
							}
							f = !!c.cancel
						} else {
							if (c === false) {
								f = true
							} else {
								d = c
							}
						}
					}
				};
				this[i] = function() {
					var k = Array.prototype.slice.call(arguments, 0), j, l, e;
					d = c = undefined;
					f = false;
					for (l = 0, e = h.before.length; l < e; l++) {
						j = h.before[l];
						b(j.fn, j.scope, k);
						if (f) {
							return d
						}
					}
					if ((c = h.originalFn.apply(g, k)) !== undefined) {
						d = c
					}
					for (l = 0, e = h.after.length; l < e; l++) {
						j = h.after[l];
						b(j.fn, j.scope, k);
						if (f) {
							return d
						}
					}
					return d
				}
			}
			return h
		}
		return {
			beforeMethod : function(d, c, b) {
				a.call(this, d).before.push( {
					fn : c,
					scope : b
				})
			},
			afterMethod : function(d, c, b) {
				a.call(this, d).after.push( {
					fn : c,
					scope : b
				})
			},
			removeMethodListener : function(h, f, d) {
				var g = this.getMethodEvent(h), c, b;
				for (c = 0, b = g.before.length; c < b; c++) {
					if (g.before[c].fn == f && g.before[c].scope == d) {
						g.before.splice(c, 1);
						return

					}
				}
				for (c = 0, b = g.after.length; c < b; c++) {
					if (g.after[c].fn == f && g.after[c].scope == d) {
						g.after.splice(c, 1);
						return

					}
				}
			},
			toggleEventLogging : function(b) {
				Ext.util.Observable[b ? "capture" : "releaseCapture"](this, function(c) {
					if (Ext.isDefined(Ext.global.console)) {
						Ext.global.console.log(c, arguments)
					}
				})
			}
		}
	}())
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.Module", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	constructor : function(a) {
		this.mixins.observable.constructor.call(this, a);
		this.init()
	},
	init : Ext.emptyFn
});
Ext.define("Ext.chart.Callout", {
	constructor : function(a) {
		if (a.callouts) {
			a.callouts.styles = Ext.applyIf(a.callouts.styles || {}, {
				color : "#000",
				font : "11px Helvetica, sans-serif"
			});
			this.callouts = Ext.apply(this.callouts || {}, a.callouts);
			this.calloutsArray = []
		}
	},
	renderCallouts : function() {
		if (!this.callouts) {
			return

		}
		var u = this, l = u.items, a = u.chart.animate, t = u.callouts, g = t.styles, e = u.calloutsArray, b = u.chart.store, r = b.getCount(), d = l.length / r, k = [], q, c, o, m;
		for (q = 0, c = 0; q < r; q++) {
			for (o = 0; o < d; o++) {
				var s = l[c], f = e[c], h = b.getAt(q), n;
				n = t.filter(h);
				if (!n && !f) {
					c++;
					continue
				}
				if (!f) {
					e[c] = f = u.onCreateCallout(h, s, q, n, o, c)
				}
				for (m in f) {
					if (f[m] && f[m].setAttributes) {
						f[m].setAttributes(g, true)
					}
				}
				if (!n) {
					for (m in f) {
						if (f[m]) {
							if (f[m].setAttributes) {
								f[m].setAttributes( {
									hidden : true
								}, true)
							} else {
								if (f[m].setVisible) {
									f[m].setVisible(false)
								}
							}
						}
					}
				}
				t.renderer(f, h);
				u.onPlaceCallout(f, h, s, q, n, a, o, c, k);
				k.push(f);
				c++
			}
		}
		this.hideCallouts(c)
	},
	onCreateCallout : function(f, m, e, h) {
		var j = this, k = j.calloutsGroup, d = j.callouts, n = d.styles, c = n.width, l = n.height, g = j.chart, b = g.surface, a = {
			lines : false
		};
		a.lines = b.add(Ext.apply( {}, {
			type : "path",
			path : "M0,0",
			stroke : j.getLegendColor() || "#555"
		}, n));
		if (d.items) {
			a.panel = Ext.create("widget.panel", {
				style : "position: absolute;",
				width : c,
				height : l,
				items : d.items,
				renderTo : g.el
			})
		}
		return a
	},
	hideCallouts : function(b) {
		var d = this.calloutsArray, a = d.length, e, c;
		while (a-- > b) {
			e = d[a];
			for (c in e) {
				if (e[c]) {
					e[c].hide(true)
				}
			}
		}
	}
});
Ext.define("Ext.chart.Mask", {
	constructor : function(a) {
		var b = this;
		b.addEvents("select");
		if (a) {
			Ext.apply(b, a)
		}
		if (b.mask) {
			b.on("afterrender", function() {
				var c = Ext.create("Ext.chart.MaskLayer", {
					renderTo : b.el
				});
				c.el.on( {
					mousemove : function(f) {
						b.onMouseMove(f)
					},
					mouseup : function(f) {
						b.resized(f)
					}
				});
				var d = Ext.create("Ext.resizer.Resizer", {
					el : c.el,
					handles : "all",
					pinned : true
				});
				d.on( {
					resize : function(f) {
						b.resized(f)
					}
				});
				c.initDraggable();
				b.maskType = b.mask;
				b.mask = c;
				b.maskSprite = b.surface.add( {
					type : "path",
					path : [ "M", 0, 0 ],
					zIndex : 1001,
					opacity : 0.7,
					hidden : true,
					stroke : "#444"
				})
			}, b, {
				single : true
			})
		}
	},
	resized : function(d) {
		var f = this, k = f.bbox || f.chartBBox, i = k.x, h = k.y, a = k.width, l = k.height, c = f.mask.getBox(true), g = Math.max, b = Math.min, m = c.x - i, j = c.y - h;
		m = g(m, i);
		j = g(j, h);
		m = b(m, a);
		j = b(j, l);
		c.x = m;
		c.y = j;
		f.fireEvent("select", f, c)
	},
	onMouseUp : function(c) {
		var a = this, d = a.bbox || a.chartBBox, b = a.maskSelection;
		a.maskMouseDown = false;
		a.mouseDown = false;
		if (a.mouseMoved) {
			a.onMouseMove(c);
			a.mouseMoved = false;
			a.fireEvent("select", a, {
				x : b.x - d.x,
				y : b.y - d.y,
				width : b.width,
				height : b.height
			})
		}
	},
	onMouseDown : function(b) {
		var a = this;
		a.mouseDown = true;
		a.mouseMoved = false;
		a.maskMouseDown = {
			x : b.getPageX() - a.el.getX(),
			y : b.getPageY() - a.el.getY()
		}
	},
	onMouseMove : function(s) {
		var t = this, n = t.maskType, a = t.bbox || t.chartBBox, h = a.x, g = a.y, b = Math, p = b.floor, i = b.abs, m = b.min, o = b.max, j = p(g + a.height), l = p(h + a.width), d = s.getPageX(), c = s.getPageY(), r = d - t.el.getX(), q = c
				- t.el.getY(), f = t.maskMouseDown, k;
		t.mouseMoved = t.mouseDown;
		r = o(r, h);
		q = o(q, g);
		r = m(r, l);
		q = m(q, j);
		if (f && t.mouseDown) {
			if (n == "horizontal") {
				q = g;
				f.y = j;
				c = t.el.getY() + a.height + t.insetPadding
			} else {
				if (n == "vertical") {
					r = h;
					f.x = l
				}
			}
			l = f.x - r;
			j = f.y - q;
			k = [ "M", r, q, "l", l, 0, 0, j, -l, 0, "z" ];
			t.maskSelection = {
				x : l > 0 ? r : r + l,
				y : j > 0 ? q : q + j,
				width : i(l),
				height : i(j)
			};
			t.mask.updateBox( {
				x : d - i(l),
				y : c - i(j),
				width : i(l),
				height : i(j)
			});
			t.mask.show();
			t.maskSprite.setAttributes( {
				hidden : true
			}, true)
		} else {
			if (n == "horizontal") {
				k = [ "M", r, g, "L", r, j ]
			} else {
				if (n == "vertical") {
					k = [ "M", h, q, "L", l, q ]
				} else {
					k = [ "M", r, g, "L", r, j, "M", h, q, "L", l, q ]
				}
			}
			t.maskSprite.setAttributes( {
				path : k,
				fill : t.maskMouseDown ? t.maskSprite.stroke : false,
				"stroke-width" : n === true ? 1 : 3,
				hidden : false
			}, true)
		}
	},
	onMouseLeave : function(b) {
		var a = this;
		a.mouseMoved = false;
		a.mouseDown = false;
		a.maskMouseDown = false;
		a.mask.hide();
		a.maskSprite.hide(true)
	}
});
Ext.define("Ext.chart.Navigation", {
	constructor : function() {
		this.originalStore = this.store
	},
	setZoom : function(g) {
		var f = this, j = f.substore || f.store, k = f.chartBBox, e = j.getCount(), h = (g.x / k.width * e) >> 0, i = Math.ceil(((g.x + g.width) / k.width * e)), b, d = [], a, l = [], c;
		j.each(function(n, m) {
			if (m < h || m > i) {
				return

			}
			c = {};
			if (!d.length) {
				n.fields.each(function(o) {
					d.push(o.name)
				});
				b = d.length
			}
			for (m = 0; m < b; m++) {
				a = d[m];
				c[a] = n.get(a)
			}
			l.push(c)
		});
		f.store = f.substore = Ext.create("Ext.data.JsonStore", {
			fields : d,
			data : l
		});
		f.redraw(true)
	},
	restoreZoom : function() {
		this.store = this.substore = this.originalStore;
		this.redraw(true)
	}
});
Ext.define("Ext.chart.Shape", {
	singleton : true,
	circle : function(a, b) {
		return a.add(Ext.apply( {
			type : "circle",
			x : b.x,
			y : b.y,
			stroke : null,
			radius : b.radius
		}, b))
	},
	line : function(a, b) {
		return a.add(Ext.apply( {
			type : "rect",
			x : b.x - b.radius,
			y : b.y - b.radius,
			height : 2 * b.radius,
			width : 2 * b.radius / 5
		}, b))
	},
	square : function(a, b) {
		return a.add(Ext.applyIf( {
			type : "rect",
			x : b.x - b.radius,
			y : b.y - b.radius,
			height : 2 * b.radius,
			width : 2 * b.radius,
			radius : null
		}, b))
	},
	triangle : function(a, b) {
		b.radius *= 1.75;
		return a.add(Ext.apply( {
			type : "path",
			stroke : null,
			path : "M".concat(b.x, ",", b.y, "m0-", b.radius * 0.58, "l", b.radius * 0.5, ",", b.radius * 0.87, "-", b.radius, ",0z")
		}, b))
	},
	diamond : function(a, c) {
		var b = c.radius;
		b *= 1.5;
		return a.add(Ext.apply( {
			type : "path",
			stroke : null,
			path : [ "M", c.x, c.y - b, "l", b, b, -b, b, -b, -b, b, -b, "z" ]
		}, c))
	},
	cross : function(a, c) {
		var b = c.radius;
		b = b / 1.7;
		return a.add(Ext.apply( {
			type : "path",
			stroke : null,
			path : "M".concat(c.x - b, ",", c.y, "l", [ -b, -b, b, -b, b, b, b, -b, b, b, -b, b, b, b, -b, b, -b, -b, -b, b, -b, -b, "z" ])
		}, c))
	},
	plus : function(a, c) {
		var b = c.radius / 1.3;
		return a.add(Ext.apply( {
			type : "path",
			stroke : null,
			path : "M".concat(c.x - b / 2, ",", c.y - b / 2, "l", [ 0, -b, b, 0, 0, b, b, 0, 0, b, -b, 0, 0, b, -b, 0, 0, -b, -b, 0, 0, -b, "z" ])
		}, c))
	},
	arrow : function(a, c) {
		var b = c.radius;
		return a.add(Ext.apply( {
			type : "path",
			path : "M".concat(c.x - b * 0.7, ",", c.y - b * 0.4, "l", [ b * 0.6, 0, 0, -b * 0.4, b, b * 0.8, -b, b * 0.8, 0, -b * 0.4, -b * 0.6, 0 ], "z")
		}, c))
	},
	drop : function(b, a, f, e, c, d) {
		c = c || 30;
		d = d || 0;
		b.add( {
			type : "path",
			path : [ "M", a, f, "l", c, 0, "A", c * 0.4, c * 0.4, 0, 1, 0, a + c * 0.7, f - c * 0.7, "z" ],
			fill : "#000",
			stroke : "none",
			rotate : {
				degrees : 22.5 - d,
				x : a,
				y : f
			}
		});
		d = (d + 90) * Math.PI / 180;
		b.add( {
			type : "text",
			x : a + c * Math.sin(d) - 10,
			y : f + c * Math.cos(d) + 5,
			text : e,
			"font-size" : c * 12 / 40,
			stroke : "none",
			fill : "#fff"
		})
	}
});
Ext.define("Ext.form.field.VTypes", (function() {
	var c = /^[a-zA-Z_]+$/, d = /^[a-zA-Z0-9_]+$/, b = /^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/, a = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
	return {
		singleton : true,
		alternateClassName : "Ext.form.VTypes",
		email : function(e) {
			return b.test(e)
		},
		emailText : 'This field should be an e-mail address in the format "user@example.com"',
		emailMask : /[a-z0-9_\.\-@\+]/i,
		url : function(e) {
			return a.test(e)
		},
		urlText : 'This field should be a URL in the format "http://www.example.com"',
		alpha : function(e) {
			return c.test(e)
		},
		alphaText : "This field should only contain letters and _",
		alphaMask : /[a-z_]/i,
		alphanum : function(e) {
			return d.test(e)
		},
		alphanumText : "This field should only contain letters, numbers and _",
		alphanumMask : /[a-z0-9_]/i
	}
})());
Ext.define("Ext.util.ClickRepeater", {
	extend : "Ext.util.Observable",
	constructor : function(b, a) {
		this.el = Ext.get(b);
		this.el.unselectable();
		Ext.apply(this, a);
		this.addEvents("mousedown", "click", "mouseup");
		if (!this.disabled) {
			this.disabled = true;
			this.enable()
		}
		if (this.handler) {
			this.on("click", this.handler, this.scope || this)
		}
		this.callParent()
	},
	interval : 20,
	delay : 250,
	preventDefault : true,
	stopDefault : false,
	timer : 0,
	enable : function() {
		if (this.disabled) {
			this.el.on("mousedown", this.handleMouseDown, this);
			if (Ext.isIE) {
				this.el.on("dblclick", this.handleDblClick, this)
			}
			if (this.preventDefault || this.stopDefault) {
				this.el.on("click", this.eventOptions, this)
			}
		}
		this.disabled = false
	},
	disable : function(a) {
		if (a || !this.disabled) {
			clearTimeout(this.timer);
			if (this.pressedCls) {
				this.el.removeCls(this.pressedCls)
			}
			Ext.getDoc().un("mouseup", this.handleMouseUp, this);
			this.el.removeAllListeners()
		}
		this.disabled = true
	},
	setDisabled : function(a) {
		this[a ? "disable" : "enable"]()
	},
	eventOptions : function(a) {
		if (this.preventDefault) {
			a.preventDefault()
		}
		if (this.stopDefault) {
			a.stopEvent()
		}
	},
	destroy : function() {
		this.disable(true);
		Ext.destroy(this.el);
		this.clearListeners()
	},
	handleDblClick : function(a) {
		clearTimeout(this.timer);
		this.el.blur();
		this.fireEvent("mousedown", this, a);
		this.fireEvent("click", this, a)
	},
	handleMouseDown : function(a) {
		clearTimeout(this.timer);
		this.el.blur();
		if (this.pressedCls) {
			this.el.addCls(this.pressedCls)
		}
		this.mousedownTime = new Date();
		Ext.getDoc().on("mouseup", this.handleMouseUp, this);
		this.el.on("mouseout", this.handleMouseOut, this);
		this.fireEvent("mousedown", this, a);
		this.fireEvent("click", this, a);
		if (this.accelerate) {
			this.delay = 400
		}
		a = new Ext.EventObjectImpl(a);
		this.timer = Ext.defer(this.click, this.delay || this.interval, this, [ a ])
	},
	click : function(a) {
		this.fireEvent("click", this, a);
		this.timer = Ext.defer(this.click, this.accelerate ? this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime), 400, -390, 12000) : this.interval, this, [ a ])
	},
	easeOutExpo : function(e, a, g, f) {
		return (e == f) ? a + g : g * (-Math.pow(2, -10 * e / f) + 1) + a
	},
	handleMouseOut : function() {
		clearTimeout(this.timer);
		if (this.pressedCls) {
			this.el.removeCls(this.pressedCls)
		}
		this.el.on("mouseover", this.handleMouseReturn, this)
	},
	handleMouseReturn : function() {
		this.el.un("mouseover", this.handleMouseReturn, this);
		if (this.pressedCls) {
			this.el.addCls(this.pressedCls)
		}
		this.click()
	},
	handleMouseUp : function(a) {
		clearTimeout(this.timer);
		this.el.un("mouseover", this.handleMouseReturn, this);
		this.el.un("mouseout", this.handleMouseOut, this);
		Ext.getDoc().un("mouseup", this.handleMouseUp, this);
		if (this.pressedCls) {
			this.el.removeCls(this.pressedCls)
		}
		this.fireEvent("mouseup", this, a)
	}
});
Ext.define("Ext.util.TextMetrics", {
	statics : {
		shared : null,
		measure : function(a, d, e) {
			var b = this, c = b.shared;
			if (!c) {
				c = b.shared = new b(a, e)
			}
			c.bind(a);
			c.setFixedWidth(e || "auto");
			return c.getSize(d)
		},
		destroy : function() {
			var a = this;
			Ext.destroy(a.shared);
			a.shared = null
		}
	},
	constructor : function(a, c) {
		var b = this.measure = Ext.getBody().createChild( {
			cls : "x-textmetrics"
		});
		this.el = Ext.get(a);
		b.position("absolute");
		b.setLeftTop(-1000, -1000);
		b.hide();
		if (c) {
			b.setWidth(c)
		}
	},
	getSize : function(c) {
		var b = this.measure, a;
		b.update(c);
		a = b.getSize();
		b.update("");
		return a
	},
	bind : function(a) {
		var b = this;
		b.el = Ext.get(a);
		b.measure.setStyle(b.el.getStyles("font-size", "font-style", "font-weight", "font-family", "line-height", "text-transform", "letter-spacing"))
	},
	setFixedWidth : function(a) {
		this.measure.setWidth(a)
	},
	getWidth : function(a) {
		this.measure.dom.style.width = "auto";
		return this.getSize(a).width
	},
	getHeight : function(a) {
		return this.getSize(a).height
	},
	destroy : function() {
		var a = this;
		a.measure.remove();
		delete a.el;
		delete a.measure
	}
}, function() {
	Ext.core.Element.addMethods( {
		getTextWidth : function(c, b, a) {
			return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom, Ext.value(c, this.dom.innerHTML, true)).width, b || 0, a || 1000000)
		}
	})
});
Ext.define("Ext.util.KeyMap", {
	alternateClassName : "Ext.KeyMap",
	constructor : function(b, d, a) {
		var c = this;
		Ext.apply(c, {
			el : Ext.get(b),
			eventName : a || c.eventName,
			bindings : []
		});
		if (d) {
			c.addBinding(d)
		}
		c.enable()
	},
	eventName : "keydown",
	addBinding : function(g) {
		if (Ext.isArray(g)) {
			Ext.each(g, this.addBinding, this);
			return

		}
		var f = g.key, h = false, d, e, b, c, a;
		if (Ext.isString(f)) {
			e = [];
			b = f.toLowerCase();
			for (c = 0, a = b.length; c < a; ++c) {
				e.push(b.charCodeAt(c))
			}
			f = e;
			h = true
		}
		if (!Ext.isArray(f)) {
			f = [ f ]
		}
		if (!h) {
			for (c = 0, a = f.length; c < a; ++c) {
				d = f[c];
				if (Ext.isString(d)) {
					f[c] = d.toLowerCase().charCodeAt(0)
				}
			}
		}
		this.bindings.push(Ext.apply( {
			keyCode : f
		}, g))
	},
	handleKeyDown : function(c) {
		if (this.enabled) {
			var d = this.bindings, b = 0, a = d.length;
			c = this.processEvent(c);
			for (; b < a; ++b) {
				this.processBinding(d[b], c)
			}
		}
	},
	processEvent : function(a) {
		return a
	},
	processBinding : function(f, a) {
		if (this.checkModifiers(f, a)) {
			var g = a.getKey(), j = f.fn || f.handler, k = f.scope || this, h = f.keyCode, b = f.defaultEventAction, c, e, d = new Ext.EventObjectImpl(a);
			for (c = 0, e = h.length; c < e; ++c) {
				if (g === h[c]) {
					if (j.call(k, g, a) !== true && b) {
						d[b]()
					}
					break
				}
			}
		}
	},
	checkModifiers : function(h, f) {
		var d = [ "shift", "ctrl", "alt" ], c = 0, a = d.length, g, b;
		for (; c < a; ++c) {
			b = d[c];
			g = h[b];
			if (!(g === undefined || (g === f[b + "Key"]))) {
				return false
			}
		}
		return true
	},
	on : function(b, d, c) {
		var g, a, e, f;
		if (Ext.isObject(b) && !Ext.isArray(b)) {
			g = b.key;
			a = b.shift;
			e = b.ctrl;
			f = b.alt
		} else {
			g = b
		}
		this.addBinding( {
			key : g,
			shift : a,
			ctrl : e,
			alt : f,
			fn : d,
			scope : c
		})
	},
	isEnabled : function() {
		return this.enabled
	},
	enable : function() {
		if (!this.enabled) {
			this.el.on(this.eventName, this.handleKeyDown, this);
			this.enabled = true
		}
	},
	disable : function() {
		if (this.enabled) {
			this.el.removeListener(this.eventName, this.handleKeyDown, this);
			this.enabled = false
		}
	},
	setDisabled : function(a) {
		if (a) {
			this.disable()
		} else {
			this.enable()
		}
	},
	destroy : function(b) {
		var a = this;
		a.bindings = [];
		a.disable();
		if (b === true) {
			a.el.remove()
		}
		delete a.el
	}
});
Ext.define("Ext.Template", {
	requires : [ "Ext.core.DomHelper", "Ext.util.Format" ],
	statics : {
		from : function(b, a) {
			b = Ext.getDom(b);
			return new this(b.value || b.innerHTML, a || "")
		}
	},
	constructor : function(d) {
		var f = this, b = arguments, a = [], c = 0, e = b.length, g;
		f.initialConfig = {};
		if (e > 1) {
			for (; c < e; c++) {
				g = b[c];
				if (typeof g == "object") {
					Ext.apply(f.initialConfig, g);
					Ext.apply(f, g)
				} else {
					a.push(g)
				}
			}
			d = a.join("")
		} else {
			if (Ext.isArray(d)) {
				a.push(d.join(""))
			} else {
				a.push(d)
			}
		}
		f.html = a.join("");
		if (f.compiled) {
			f.compile()
		}
	},
	isTemplate : true,
	disableFormats : false,
	re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
	applyTemplate : function(a) {
		var f = this, c = f.disableFormats !== true, e = Ext.util.Format, b = f;
		if (f.compiled) {
			return f.compiled(a)
		}
		function d(g, i, j, h) {
			if (j && c) {
				if (h) {
					h = [ a[i] ].concat(Ext.functionFactory("return [" + h + "];")())
				} else {
					h = [a[i]]
				}
				if (j.substr(0, 5) == "this.") {
					return b[j.substr(5)].apply(b, h)
				} else {
					return e[j].apply(e, h)
				}
			} else {
				return a[i] !== undefined ? a[i] : ""
			}
		}
		return f.html.replace(f.re, d)
	},
	set : function(a, c) {
		var b = this;
		b.html = a;
		b.compiled = null;
		return c ? b.compile() : b
	},
	compileARe : /\\/g,
	compileBRe : /(\r\n|\n)/g,
	compileCRe : /'/g,
	compile : function() {
		var me = this, fm = Ext.util.Format, useFormat = me.disableFormats !== true, body, bodyReturn;
		function fn(m, name, format, args) {
			if (format && useFormat) {
				args = args ? "," + args : "";
				if (format.substr(0, 5) != "this.") {
					format = "fm." + format + "("
				} else {
					format = "this." + format.substr(5) + "("
				}
			} else {
				args = "";
				format = "(values['" + name + "'] == undefined ? '' : "
			}
			return "'," + format + "values['" + name + "']" + args + ") ,'"
		}
		bodyReturn = me.html.replace(me.compileARe, "\\\\").replace(
				me.compileBRe, "\\n").replace(me.compileCRe, "\\'").replace(
				me.re, fn);
		body = "this.compiled = function(values){ return ['" + bodyReturn
				+ "'].join('');};";
		eval(body);
		return me
	},
	insertFirst : function(b, a, c) {
		return this.doInsert("afterBegin", b, a, c)
	},
	insertBefore : function(b, a, c) {
		return this.doInsert("beforeBegin", b, a, c)
	},
	insertAfter : function(b, a, c) {
		return this.doInsert("afterEnd", b, a, c)
	},
	append : function(b, a, c) {
		return this.doInsert("beforeEnd", b, a, c)
	},
	doInsert : function(c, e, b, a) {
		e = Ext.getDom(e);
		var d = Ext.core.DomHelper.insertHtml(c, e, this.applyTemplate(b));
		return a ? Ext.get(d, true) : d
	},
	overwrite : function(b, a, c) {
		b = Ext.getDom(b);
		b.innerHTML = this.applyTemplate(a);
		return c ? Ext.get(b.firstChild, true) : b.firstChild
	}
}, function() {
	this.createAlias("apply", "applyTemplate")
});
Ext.define("Ext.data.Operation", {
			synchronous : true,
			action : undefined,
			filters : undefined,
			sorters : undefined,
			group : undefined,
			start : undefined,
			limit : undefined,
			batch : undefined,
			started : false,
			running : false,
			complete : false,
			success : undefined,
			exception : false,
			error : undefined,
			constructor : function(a) {
				Ext.apply(this, a || {})
			},
			setStarted : function() {
				this.started = true;
				this.running = true
			},
			setCompleted : function() {
				this.complete = true;
				this.running = false
			},
			setSuccessful : function() {
				this.success = true
			},
			setException : function(a) {
				this.exception = true;
				this.success = false;
				this.running = false;
				this.error = a
			},
			hasException : function() {
				return this.exception === true
			},
			getError : function() {
				return this.error
			},
			getRecords : function() {
				var a = this.getResultSet();
				return (a === undefined ? this.records : a.records)
			},
			getResultSet : function() {
				return this.resultSet
			},
			isStarted : function() {
				return this.started === true
			},
			isRunning : function() {
				return this.running === true
			},
			isComplete : function() {
				return this.complete === true
			},
			wasSuccessful : function() {
				return this.isComplete() && this.success === true
			},
			setBatch : function(a) {
				this.batch = a
			},
			allowWrite : function() {
				return this.action != "read"
			}
		});
Ext.define("Ext.data.validations", {
			singleton : true,
			presenceMessage : "must be present",
			lengthMessage : "is the wrong length",
			formatMessage : "is the wrong format",
			inclusionMessage : "is not included in the list of acceptable values",
			exclusionMessage : "is not an acceptable value",
			presence : function(a, b) {
				if (b === undefined) {
					b = a
				}
				return !!b
			},
			length : function(b, e) {
				if (e === undefined) {
					return false
				}
				var d = e.length, c = b.min, a = b.max;
				if ((c && d < c) || (a && d > a)) {
					return false
				} else {
					return true
				}
			},
			format : function(a, b) {
				return !!(a.matcher && a.matcher.test(b))
			},
			inclusion : function(a, b) {
				return a.list && Ext.Array.indexOf(a.list, b) != -1
			},
			exclusion : function(a, b) {
				return a.list && Ext.Array.indexOf(a.list, b) == -1
			}
		});
Ext.define("Ext.draw.Color", {
	colorToHexRe : /(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,
	rgbRe : /\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,
	hexRe : /\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,
	lightnessFactor : 0.2,
	constructor : function(d, c, a) {
		var b = this, e = Ext.Number.constrain;
		b.r = e(d, 0, 255);
		b.g = e(c, 0, 255);
		b.b = e(a, 0, 255)
	},
	getRed : function() {
		return this.r
	},
	getGreen : function() {
		return this.g
	},
	getBlue : function() {
		return this.b
	},
	getRGB : function() {
		var a = this;
		return [a.r, a.g, a.b]
	},
	getHSL : function() {
		var i = this, a = i.r / 255, f = i.g / 255, j = i.b / 255, k = Math
				.max(a, f, j), d = Math.min(a, f, j), m = k - d, e, n = 0, c = 0.5
				* (k + d);
		if (d != k) {
			n = (c < 0.5) ? m / (k + d) : m / (2 - k - d);
			if (a == k) {
				e = 60 * (f - j) / m
			} else {
				if (f == k) {
					e = 120 + 60 * (j - a) / m
				} else {
					e = 240 + 60 * (a - f) / m
				}
			}
			if (e < 0) {
				e += 360
			}
			if (e >= 360) {
				e -= 360
			}
		}
		return [e, n, c]
	},
	getLighter : function(b) {
		var a = this.getHSL();
		b = b || this.lightnessFactor;
		a[2] = Ext.Number.constrain(a[2] + b, 0, 1);
		return this.fromHSL(a[0], a[1], a[2])
	},
	getDarker : function(a) {
		a = a || this.lightnessFactor;
		return this.getLighter(-a)
	},
	toString : function() {
		var f = this, c = Math.round, e = c(f.r).toString(16), d = c(f.g)
				.toString(16), a = c(f.b).toString(16);
		e = (e.length == 1) ? "0" + e : e;
		d = (d.length == 1) ? "0" + d : d;
		a = (a.length == 1) ? "0" + a : a;
		return ["#", e, d, a].join("")
	},
	toHex : function(b) {
		if (Ext.isArray(b)) {
			b = b[0]
		}
		if (!Ext.isString(b)) {
			return ""
		}
		if (b.substr(0, 1) === "#") {
			return b
		}
		var e = this.colorToHexRe.exec(b);
		if (Ext.isArray(e)) {
			var f = parseInt(e[2], 10), d = parseInt(e[3], 10), a = parseInt(
					e[4], 10), c = a | (d << 8) | (f << 16);
			return e[1] + "#" + ("000000" + c.toString(16)).slice(-6)
		} else {
			return ""
		}
	},
	fromString : function(h) {
		var c, e, d, a, f = parseInt;
		if ((h.length == 4 || h.length == 7) && h.substr(0, 1) === "#") {
			c = h.match(this.hexRe);
			if (c) {
				e = f(c[1], 16) >> 0;
				d = f(c[2], 16) >> 0;
				a = f(c[3], 16) >> 0;
				if (h.length == 4) {
					e += (e * 16);
					d += (d * 16);
					a += (a * 16)
				}
			}
		} else {
			c = h.match(this.rgbRe);
			if (c) {
				e = c[1];
				d = c[2];
				a = c[3]
			}
		}
		return (typeof e == "undefined") ? undefined : Ext.create(
				"Ext.draw.Color", e, d, a)
	},
	getGrayscale : function() {
		return this.r * 0.3 + this.g * 0.59 + this.b * 0.11
	},
	fromHSL : function(f, n, d) {
		var a, b, c, e, j = [], k = Math.abs, g = Math.floor;
		if (n == 0 || f == null) {
			j = [d, d, d]
		} else {
			f /= 60;
			a = n * (1 - k(2 * d - 1));
			b = a * (1 - k(f - 2 * g(f / 2) - 1));
			c = d - a / 2;
			switch (g(f)) {
				case 0 :
					j = [a, b, 0];
					break;
				case 1 :
					j = [b, a, 0];
					break;
				case 2 :
					j = [0, a, b];
					break;
				case 3 :
					j = [0, b, a];
					break;
				case 4 :
					j = [b, 0, a];
					break;
				case 5 :
					j = [a, 0, b];
					break
			}
			j = [j[0] + c, j[1] + c, j[2] + c]
		}
		return Ext.create("Ext.draw.Color", j[0] * 255, j[1] * 255, j[2] * 255)
	}
}, function() {
	var a = this.prototype;
	this.addStatics({
				fromHSL : function() {
					return a.fromHSL.apply(a, arguments)
				},
				fromString : function() {
					return a.fromString.apply(a, arguments)
				},
				toHex : function() {
					return a.toHex.apply(a, arguments)
				}
			})
});
Ext.define("Ext.draw.Draw", {
	singleton : true,
	requires : ["Ext.draw.Color"],
	pathToStringRE : /,?([achlmqrstvxz]),?/gi,
	pathCommandRE : /([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,
	pathValuesRE : /(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,
	stopsRE : /^(\d+%?)$/,
	radian : Math.PI / 180,
	availableAnimAttrs : {
		along : "along",
		blur : null,
		"clip-rect" : "csv",
		cx : null,
		cy : null,
		fill : "color",
		"fill-opacity" : null,
		"font-size" : null,
		height : null,
		opacity : null,
		path : "path",
		r : null,
		rotation : "csv",
		rx : null,
		ry : null,
		scale : "csv",
		stroke : "color",
		"stroke-opacity" : null,
		"stroke-width" : null,
		translation : "csv",
		width : null,
		x : null,
		y : null
	},
	is : function(b, a) {
		a = String(a).toLowerCase();
		return (a == "object" && b === Object(b))
				|| (a == "undefined" && typeof b == a)
				|| (a == "null" && b === null)
				|| (a == "array" && Array.isArray && Array.isArray(b))
				|| (Object.prototype.toString.call(b).toLowerCase()
						.slice(8, -1)) == a
	},
	ellipsePath : function(b) {
		var a = b.attr;
		return Ext.String.format(
				"M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z", a.x,
				a.y - a.ry, a.rx, a.ry, a.y + a.ry)
	},
	rectPath : function(b) {
		var a = b.attr;
		if (a.radius) {
			return Ext.String
					.format(
							"M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",
							a.x + a.radius, a.y, a.width - a.radius * 2,
							a.radius, -a.radius, a.height - a.radius * 2,
							a.radius * 2 - a.width, a.radius * 2 - a.height)
		} else {
			return Ext.String.format("M{0},{1}l{2},0,0,{3},{4},0z", a.x, a.y,
					a.width, a.height, -a.width)
		}
	},
	path2string : function() {
		return this.join(",").replace(Ext.draw.Draw.pathToStringRE, "$1")
	},
	parsePathString : function(a) {
		if (!a) {
			return null
		}
		var d = {
			a : 7,
			c : 6,
			h : 1,
			l : 2,
			m : 2,
			q : 4,
			s : 4,
			t : 2,
			v : 1,
			z : 0
		}, c = [], b = this;
		if (b.is(a, "array") && b.is(a[0], "array")) {
			c = b.pathClone(a)
		}
		if (!c.length) {
			String(a).replace(b.pathCommandRE, function(f, e, i) {
						var h = [], g = e.toLowerCase();
						i.replace(b.pathValuesRE, function(k, j) {
									j && h.push(+j)
								});
						if (g == "m" && h.length > 2) {
							c.push([e].concat(h.splice(0, 2)));
							g = "l";
							e = (e == "m") ? "l" : "L"
						}
						while (h.length >= d[g]) {
							c.push([e].concat(h.splice(0, d[g])));
							if (!d[g]) {
								break
							}
						}
					})
		}
		c.toString = b.path2string;
		return c
	},
	mapPath : function(k, f) {
		if (!f) {
			return k
		}
		var g, e, c, h, a, d, b;
		k = this.path2curve(k);
		for (c = 0, h = k.length; c < h; c++) {
			b = k[c];
			for (a = 1, d = b.length; a < d - 1; a += 2) {
				g = f.x(b[a], b[a + 1]);
				e = f.y(b[a], b[a + 1]);
				b[a] = g;
				b[a + 1] = e
			}
		}
		return k
	},
	pathClone : function(f) {
		var c = [], a, e, b, d;
		if (!this.is(f, "array") || !this.is(f && f[0], "array")) {
			f = this.parsePathString(f)
		}
		for (b = 0, d = f.length; b < d; b++) {
			c[b] = [];
			for (a = 0, e = f[b].length; a < e; a++) {
				c[b][a] = f[b][a]
			}
		}
		c.toString = this.path2string;
		return c
	},
	pathToAbsolute : function(d) {
		if (!this.is(d, "array") || !this.is(d && d[0], "array")) {
			d = this.parsePathString(d)
		}
		var l = [], n = 0, m = 0, q = 0, p = 0, c = 0, g, s, a, o, f, h, e, b;
		if (d[0][0] == "M") {
			n = +d[0][1];
			m = +d[0][2];
			q = n;
			p = m;
			c++;
			l[0] = ["M", n, m]
		}
		for (g = c, s = d.length; g < s; g++) {
			a = l[g] = [];
			o = d[g];
			if (o[0] != o[0].toUpperCase()) {
				a[0] = o[0].toUpperCase();
				switch (a[0]) {
					case "A" :
						a[1] = o[1];
						a[2] = o[2];
						a[3] = o[3];
						a[4] = o[4];
						a[5] = o[5];
						a[6] = +(o[6] + n);
						a[7] = +(o[7] + m);
						break;
					case "V" :
						a[1] = +o[1] + m;
						break;
					case "H" :
						a[1] = +o[1] + n;
						break;
					case "M" :
						q = +o[1] + n;
						p = +o[2] + m;
					default :
						for (f = 1, h = o.length; f < h; f++) {
							a[f] = +o[f] + ((f % 2) ? n : m)
						}
				}
			} else {
				for (e = 0, b = o.length; e < b; e++) {
					l[g][e] = o[e]
				}
			}
			switch (a[0]) {
				case "Z" :
					n = q;
					m = p;
					break;
				case "H" :
					n = a[1];
					break;
				case "V" :
					m = a[1];
					break;
				case "M" :
					q = l[g][l[g].length - 2];
					p = l[g][l[g].length - 1];
				default :
					n = l[g][l[g].length - 2];
					m = l[g][l[g].length - 1]
			}
		}
		l.toString = this.path2string;
		return l
	},
	pathToRelative : function(d) {
		if (!this.is(d, "array") || !this.is(d && d[0], "array")) {
			d = this.parsePathString(d)
		}
		var m = [], o = 0, n = 0, s = 0, q = 0, c = 0;
		if (d[0][0] == "M") {
			o = d[0][1];
			n = d[0][2];
			s = o;
			q = n;
			c++;
			m.push(["M", o, n])
		}
		for (var g = c, t = d.length; g < t; g++) {
			var a = m[g] = [], p = d[g];
			if (p[0] != p[0].toLowerCase()) {
				a[0] = p[0].toLowerCase();
				switch (a[0]) {
					case "a" :
						a[1] = p[1];
						a[2] = p[2];
						a[3] = p[3];
						a[4] = p[4];
						a[5] = p[5];
						a[6] = +(p[6] - o).toFixed(3);
						a[7] = +(p[7] - n).toFixed(3);
						break;
					case "v" :
						a[1] = +(p[1] - n).toFixed(3);
						break;
					case "m" :
						s = p[1];
						q = p[2];
					default :
						for (var f = 1, h = p.length; f < h; f++) {
							a[f] = +(p[f] - ((f % 2) ? o : n)).toFixed(3)
						}
				}
			} else {
				a = m[g] = [];
				if (p[0] == "m") {
					s = p[1] + o;
					q = p[2] + n
				}
				for (var e = 0, b = p.length; e < b; e++) {
					m[g][e] = p[e]
				}
			}
			var l = m[g].length;
			switch (m[g][0]) {
				case "z" :
					o = s;
					n = q;
					break;
				case "h" :
					o += +m[g][l - 1];
					break;
				case "v" :
					n += +m[g][l - 1];
					break;
				default :
					o += +m[g][l - 2];
					n += +m[g][l - 1]
			}
		}
		m.toString = this.path2string;
		return m
	},
	path2curve : function(j) {
		var d = this, g = d.pathToAbsolute(j), c = g.length, h = {
			x : 0,
			y : 0,
			bx : 0,
			by : 0,
			X : 0,
			Y : 0,
			qx : null,
			qy : null
		}, b, a, f, e;
		for (b = 0; b < c; b++) {
			g[b] = d.command2curve(g[b], h);
			if (g[b].length > 7) {
				g[b].shift();
				e = g[b];
				while (e.length) {
					g.splice(b++, 0, ["C"].concat(e.splice(0, 6)))
				}
				g.splice(b, 1);
				c = g.length
			}
			a = g[b];
			f = a.length;
			h.x = a[f - 2];
			h.y = a[f - 1];
			h.bx = parseFloat(a[f - 4]) || h.x;
			h.by = parseFloat(a[f - 3]) || h.y
		}
		return g
	},
	interpolatePaths : function(q, k) {
		var h = this, d = h.pathToAbsolute(q), l = h.pathToAbsolute(k), m = {
			x : 0,
			y : 0,
			bx : 0,
			by : 0,
			X : 0,
			Y : 0,
			qx : null,
			qy : null
		}, a = {
			x : 0,
			y : 0,
			bx : 0,
			by : 0,
			X : 0,
			Y : 0,
			qx : null,
			qy : null
		}, b = function(p, r) {
			if (p[r].length > 7) {
				p[r].shift();
				var s = p[r];
				while (s.length) {
					p.splice(r++, 0, ["C"].concat(s.splice(0, 6)))
				}
				p.splice(r, 1);
				n = Math.max(d.length, l.length || 0)
			}
		}, c = function(u, t, r, p, s) {
			if (u && t && u[s][0] == "M" && t[s][0] != "M") {
				t.splice(s, 0, ["M", p.x, p.y]);
				r.bx = 0;
				r.by = 0;
				r.x = u[s][1];
				r.y = u[s][2];
				n = Math.max(d.length, l.length || 0)
			}
		};
		for (var g = 0, n = Math.max(d.length, l.length || 0); g < n; g++) {
			d[g] = h.command2curve(d[g], m);
			b(d, g);
			(l[g] = h.command2curve(l[g], a));
			b(l, g);
			c(d, l, m, a, g);
			c(l, d, a, m, g);
			var f = d[g], o = l[g], e = f.length, j = o.length;
			m.x = f[e - 2];
			m.y = f[e - 1];
			m.bx = parseFloat(f[e - 4]) || m.x;
			m.by = parseFloat(f[e - 3]) || m.y;
			a.bx = (parseFloat(o[j - 4]) || a.x);
			a.by = (parseFloat(o[j - 3]) || a.y);
			a.x = o[j - 2];
			a.y = o[j - 1]
		}
		return [d, l]
	},
	command2curve : function(c, b) {
		var a = this;
		if (!c) {
			return ["C", b.x, b.y, b.x, b.y, b.x, b.y]
		}
		if (c[0] != "T" && c[0] != "Q") {
			b.qx = b.qy = null
		}
		switch (c[0]) {
			case "M" :
				b.X = c[1];
				b.Y = c[2];
				break;
			case "A" :
				c = ["C"].concat(a.arc2curve.apply(a, [b.x, b.y].concat(c
								.slice(1))));
				break;
			case "S" :
				c = ["C", b.x + (b.x - (b.bx || b.x)),
						b.y + (b.y - (b.by || b.y))].concat(c.slice(1));
				break;
			case "T" :
				b.qx = b.x + (b.x - (b.qx || b.x));
				b.qy = b.y + (b.y - (b.qy || b.y));
				c = ["C"].concat(a.quadratic2curve(b.x, b.y, b.qx, b.qy, c[1],
						c[2]));
				break;
			case "Q" :
				b.qx = c[1];
				b.qy = c[2];
				c = ["C"].concat(a.quadratic2curve(b.x, b.y, c[1], c[2], c[3],
						c[4]));
				break;
			case "L" :
				c = ["C"].concat(b.x, b.y, c[1], c[2], c[1], c[2]);
				break;
			case "H" :
				c = ["C"].concat(b.x, b.y, c[1], b.y, c[1], b.y);
				break;
			case "V" :
				c = ["C"].concat(b.x, b.y, b.x, c[1], b.x, c[1]);
				break;
			case "Z" :
				c = ["C"].concat(b.x, b.y, b.X, b.Y, b.X, b.Y);
				break
		}
		return c
	},
	quadratic2curve : function(b, d, g, e, a, c) {
		var f = 1 / 3, h = 2 / 3;
		return [f * b + h * g, f * d + h * e, f * a + h * g, f * c + h * e, a,
				c]
	},
	rotate : function(b, g, a) {
		var d = Math.cos(a), c = Math.sin(a), f = b * d - g * c, e = b * c + g
				* d;
		return {
			x : f,
			y : e
		}
	},
	arc2curve : function(u, ag, I, G, A, n, g, s, af, B) {
		var w = this, e = Math.PI, z = w.radian, F = e * 120 / 180, b = z
				* (+A || 0), N = [], K = Math, U = K.cos, a = K.sin, W = K.sqrt, v = K.abs, o = K.asin, J, c, q, P, O, ab, d, S, V, D, C, m, l, r, j, ae, f, ad, Q, T, R, ac, aa, Z, X, M, Y, L, E, H, p;
		if (!B) {
			J = w.rotate(u, ag, -b);
			u = J.x;
			ag = J.y;
			J = w.rotate(s, af, -b);
			s = J.x;
			af = J.y;
			c = U(z * A);
			q = a(z * A);
			P = (u - s) / 2;
			O = (ag - af) / 2;
			ab = (P * P) / (I * I) + (O * O) / (G * G);
			if (ab > 1) {
				ab = W(ab);
				I = ab * I;
				G = ab * G
			}
			d = I * I;
			S = G * G;
			V = (n == g ? -1 : 1)
					* W(v((d * S - d * O * O - S * P * P)
							/ (d * O * O + S * P * P)));
			D = V * I * O / G + (u + s) / 2;
			C = V * -G * P / I + (ag + af) / 2;
			m = o(((ag - C) / G).toFixed(7));
			l = o(((af - C) / G).toFixed(7));
			m = u < D ? e - m : m;
			l = s < D ? e - l : l;
			if (m < 0) {
				m = e * 2 + m
			}
			if (l < 0) {
				l = e * 2 + l
			}
			if (g && m > l) {
				m = m - e * 2
			}
			if (!g && l > m) {
				l = l - e * 2
			}
		} else {
			m = B[0];
			l = B[1];
			D = B[2];
			C = B[3]
		}
		r = l - m;
		if (v(r) > F) {
			E = l;
			H = s;
			p = af;
			l = m + F * (g && l > m ? 1 : -1);
			s = D + I * U(l);
			af = C + G * a(l);
			N = w.arc2curve(s, af, I, G, A, 0, g, H, p, [l, E, D, C])
		}
		r = l - m;
		j = U(m);
		ae = a(m);
		f = U(l);
		ad = a(l);
		Q = K.tan(r / 4);
		T = 4 / 3 * I * Q;
		R = 4 / 3 * G * Q;
		ac = [u, ag];
		aa = [u + T * ae, ag - R * j];
		Z = [s + T * ad, af - R * f];
		X = [s, af];
		aa[0] = 2 * ac[0] - aa[0];
		aa[1] = 2 * ac[1] - aa[1];
		if (B) {
			return [aa, Z, X].concat(N)
		} else {
			N = [aa, Z, X].concat(N).join().split(",");
			M = [];
			L = N.length;
			for (Y = 0; Y < L; Y++) {
				M[Y] = Y % 2 ? w.rotate(N[Y - 1], N[Y], b).y : w.rotate(N[Y],
						N[Y + 1], b).x
			}
			return M
		}
	},
	rotatePoint : function(b, g, e, a, f) {
		if (!e) {
			return {
				x : b,
				y : g
			}
		}
		a = a || 0;
		f = f || 0;
		b = b - a;
		g = g - f;
		e = e * this.radian;
		var d = Math.cos(e), c = Math.sin(e);
		return {
			x : b * d - g * c + a,
			y : b * c + g * d + f
		}
	},
	rotateAndTranslatePath : function(h) {
		var c = h.rotation.degrees, d = h.rotation.x, b = h.rotation.y, n = h.translation.x, k = h.translation.y, m, f, a, l, e, g = [];
		if (!c && !n && !k) {
			return this.pathToAbsolute(h.attr.path)
		}
		n = n || 0;
		k = k || 0;
		m = this.pathToAbsolute(h.attr.path);
		for (f = m.length; f--;) {
			a = g[f] = m[f].slice();
			if (a[0] == "A") {
				l = this.rotatePoint(a[6], a[7], c, d, b);
				a[6] = l.x + n;
				a[7] = l.y + k
			} else {
				e = 1;
				while (a[e + 1] != null) {
					l = this.rotatePoint(a[e], a[e + 1], c, d, b);
					a[e] = l.x + n;
					a[e + 1] = l.y + k;
					e += 2
				}
			}
		}
		return g
	},
	pathDimensions : function(l) {
		if (!l || !(l + "")) {
			return {
				x : 0,
				y : 0,
				width : 0,
				height : 0
			}
		}
		l = this.path2curve(l);
		var h = 0, g = 0, d = [], b = [], c, e, k, a, j, f;
		for (e = 0, k = l.length; e < k; e++) {
			c = l[e];
			if (c[0] == "M") {
				h = c[1];
				g = c[2];
				d.push(h);
				b.push(g)
			} else {
				f = this.curveDim(h, g, c[1], c[2], c[3], c[4], c[5], c[6]);
				d = d.concat(f.min.x, f.max.x);
				b = b.concat(f.min.y, f.max.y);
				h = c[5];
				g = c[6]
			}
		}
		a = Math.min.apply(0, d);
		j = Math.min.apply(0, b);
		return {
			x : a,
			y : j,
			path : l,
			width : Math.max.apply(0, d) - a,
			height : Math.max.apply(0, b) - j
		}
	},
	intersect : function(p, d) {
		var m, h, t, n, q;
		var f = function(e) {
			return (h[0] - m[0]) * (e[1] - m[1]) > (h[1] - m[1])
					* (e[0] - m[0])
		};
		var a = function() {
			var v = [];
			var u = m[0] - h[0], s = m[1] - h[1], e = t[0] - n[0], w = t[1]
					- n[1], l = m[0] * h[1] - m[1] * h[0], j = t[0] * n[1]
					- t[1] * n[0], i = 1 / (u * w - s * e);
			v[0] = (l * e - j * u) * i;
			v[1] = (l * w - j * s) * i;
			return v
		};
		var r = p;
		m = d[d.length - 1];
		for (var k = 0, c = d.length; k < c; ++k) {
			h = d[k];
			var b = r;
			r = [];
			t = b[b.length - 1];
			for (var g = 0, o = b.length; g < o; g++) {
				n = b[g];
				if (f(n)) {
					if (!f(t)) {
						r.push(a())
					}
					r.push(n)
				} else {
					if (f(t)) {
						r.push(a())
					}
				}
				t = n
			}
			m = h
		}
		return r
	},
	curveDim : function(f, d, h, g, s, r, o, l) {
		var q = (s - 2 * h + f) - (o - 2 * s + h), n = 2 * (h - f) - 2
				* (s - h), k = f - h, j = (-n + Math.sqrt(n * n - 4 * q * k))
				/ 2 / q, i = (-n - Math.sqrt(n * n - 4 * q * k)) / 2 / q, m = [
				d, l], p = [f, o], e;
		if (Math.abs(j) > 1000000000000) {
			j = 0.5
		}
		if (Math.abs(i) > 1000000000000) {
			i = 0.5
		}
		if (j > 0 && j < 1) {
			e = this.findDotAtSegment(f, d, h, g, s, r, o, l, j);
			p.push(e.x);
			m.push(e.y)
		}
		if (i > 0 && i < 1) {
			e = this.findDotAtSegment(f, d, h, g, s, r, o, l, i);
			p.push(e.x);
			m.push(e.y)
		}
		q = (r - 2 * g + d) - (l - 2 * r + g);
		n = 2 * (g - d) - 2 * (r - g);
		k = d - g;
		j = (-n + Math.sqrt(n * n - 4 * q * k)) / 2 / q;
		i = (-n - Math.sqrt(n * n - 4 * q * k)) / 2 / q;
		if (Math.abs(j) > 1000000000000) {
			j = 0.5
		}
		if (Math.abs(i) > 1000000000000) {
			i = 0.5
		}
		if (j > 0 && j < 1) {
			e = this.findDotAtSegment(f, d, h, g, s, r, o, l, j);
			p.push(e.x);
			m.push(e.y)
		}
		if (i > 0 && i < 1) {
			e = this.findDotAtSegment(f, d, h, g, s, r, o, l, i);
			p.push(e.x);
			m.push(e.y)
		}
		return {
			min : {
				x : Math.min.apply(0, p),
				y : Math.min.apply(0, m)
			},
			max : {
				x : Math.max.apply(0, p),
				y : Math.max.apply(0, m)
			}
		}
	},
	getAnchors : function(d, c, p, n, i, g, s) {
		s = s || 4;
		var e = Math.min(
				Math.sqrt(Math.pow(d - p, 2) + Math.pow(c - n, 2)) / s, Math
						.sqrt(Math.pow(i - p, 2) + Math.pow(g - n, 2))
						/ s), q = Math.atan((p - d) / Math.abs(n - c)), o = Math
				.atan((i - p) / Math.abs(n - g)), k = Math.PI;
		q = c < n ? k - q : q;
		o = g < n ? k - o : o;
		var f = k / 2 - ((q + o) % (k * 2)) / 2;
		f > k / 2 && (f -= k);
		var t = e * Math.sin(f + q), m = e * Math.cos(f + q), r = e
				* Math.sin(f + o), j = e * Math.cos(f + o), h = {
			x1 : p - t,
			y1 : n + m,
			x2 : p + r,
			y2 : n + j
		};
		return h
	},
	smooth : function(a, q) {
		var p = this.path2curve(a), e = [p[0]], h = p[0][1], g = p[0][2], r, t, u = 1, k = p.length, f = 1, m = h, l = g, c = 0, b = 0;
		for (; u < k; u++) {
			var z = p[u], w = z.length, v = p[u - 1], n = v.length, s = p[u + 1], o = s
					&& s.length;
			if (z[0] == "M") {
				m = z[1];
				l = z[2];
				r = u + 1;
				while (p[r][0] != "C") {
					r++
				}
				c = p[r][5];
				b = p[r][6];
				e.push(["M", m, l]);
				f = e.length;
				h = m;
				g = l;
				continue
			}
			if (z[w - 2] == m && z[w - 1] == l && (!s || s[0] == "M")) {
				var d = e[f].length;
				t = this.getAnchors(v[n - 2], v[n - 1], m, l, e[f][d - 2],
						e[f][d - 1], q);
				e[f][1] = t.x2;
				e[f][2] = t.y2
			} else {
				if (!s || s[0] == "M") {
					t = {
						x1 : z[w - 2],
						y1 : z[w - 1]
					}
				} else {
					t = this.getAnchors(v[n - 2], v[n - 1], z[w - 2], z[w - 1],
							s[o - 2], s[o - 1], q)
				}
			}
			e.push(["C", h, g, t.x1, t.y1, z[w - 2], z[w - 1]]);
			h = t.x2;
			g = t.y2
		}
		return e
	},
	findDotAtSegment : function(b, a, d, c, i, h, g, f, j) {
		var e = 1 - j;
		return {
			x : Math.pow(e, 3) * b + Math.pow(e, 2) * 3 * j * d + e * 3 * j * j
					* i + Math.pow(j, 3) * g,
			y : Math.pow(e, 3) * a + Math.pow(e, 2) * 3 * j * c + e * 3 * j * j
					* h + Math.pow(j, 3) * f
		}
	},
	snapEnds : function(p, q, d) {
		var c = (q - p) / d, a = Math.floor(Math.log(c) / Math.LN10) + 1, e = Math
				.pow(10, a), r, n = Math.round((c % e) * Math.pow(10, 2 - a)), b = [
				[0, 15], [20, 4], [30, 2], [40, 4], [50, 9], [60, 4], [70, 2],
				[80, 4], [100, 15]], g = 0, o, j, h, f, k = 1000000000, l = b.length;
		r = p = Math.floor(p / e) * e;
		for (h = 0; h < l; h++) {
			o = b[h][0];
			j = (o - n) < 0 ? 1000000 : (o - n) / b[h][1];
			if (j < k) {
				f = o;
				k = j
			}
		}
		c = Math.floor(c * Math.pow(10, -a)) * Math.pow(10, a) + f
				* Math.pow(10, a - 2);
		while (r < q) {
			r += c;
			g++
		}
		q = +r.toFixed(10);
		return {
			from : p,
			to : q,
			power : a,
			step : c,
			steps : g
		}
	},
	sorter : function(d, c) {
		return d.offset - c.offset
	},
	rad : function(a) {
		return a % 360 * Math.PI / 180
	},
	degrees : function(a) {
		return a * 180 / Math.PI % 360
	},
	withinBox : function(a, c, b) {
		b = b || {};
		return (a >= b.x && a <= (b.x + b.width) && c >= b.y && c <= (b.y + b.height))
	},
	parseGradient : function(j) {
		var e = this, f = j.type || "linear", c = j.angle || 0, h = e.radian, k = j.stops, a = [], i, b, g, d;
		if (f == "linear") {
			b = [0, 0, Math.cos(c * h), Math.sin(c * h)];
			g = 1 / (Math.max(Math.abs(b[2]), Math.abs(b[3])) || 1);
			b[2] *= g;
			b[3] *= g;
			if (b[2] < 0) {
				b[0] = -b[2];
				b[2] = 0
			}
			if (b[3] < 0) {
				b[1] = -b[3];
				b[3] = 0
			}
		}
		for (i in k) {
			if (k.hasOwnProperty(i) && e.stopsRE.test(i)) {
				d = {
					offset : parseInt(i, 10),
					color : Ext.draw.Color.toHex(k[i].color) || "#ffffff",
					opacity : k[i].opacity || 1
				};
				a.push(d)
			}
		}
		Ext.Array.sort(a, e.sorter);
		if (f == "linear") {
			return {
				id : j.id,
				type : f,
				vector : b,
				stops : a
			}
		} else {
			return {
				id : j.id,
				type : f,
				centerX : j.centerX,
				centerY : j.centerY,
				focalX : j.focalX,
				focalY : j.focalY,
				radius : j.radius,
				vector : b,
				stops : a
			}
		}
	}
});
Ext.define("Ext.data.Tree", {
			alias : "data.tree",
			mixins : {
				observable : "Ext.util.Observable"
			},
			root : null,
			constructor : function(a) {
				var b = this;
				b.nodeHash = {};
				b.mixins.observable.constructor.call(b);
				if (a) {
					b.setRootNode(a)
				}
			},
			getRootNode : function() {
				return this.root
			},
			setRootNode : function(b) {
				var a = this;
				a.root = b;
				Ext.data.NodeInterface.decorate(b);
				if (a.fireEvent("beforeappend", null, b) !== false) {
					b.set("root", true);
					b.updateInfo();
					a.relayEvents(b, ["append", "remove", "move", "insert",
									"beforeappend", "beforeremove",
									"beforemove", "beforeinsert", "expand",
									"collapse", "beforeexpand",
									"beforecollapse", "rootchange"]);
					b.on({
								scope : a,
								insert : a.onNodeInsert,
								append : a.onNodeAppend,
								remove : a.onNodeRemove
							});
					a.registerNode(b);
					a.fireEvent("append", null, b);
					a.fireEvent("rootchange", b)
				}
				return b
			},
			flatten : function() {
				var a = [], c = this.nodeHash, b;
				for (b in c) {
					if (c.hasOwnProperty(b)) {
						a.push(c[b])
					}
				}
				return a
			},
			onNodeInsert : function(a, b) {
				this.registerNode(b)
			},
			onNodeAppend : function(a, b) {
				this.registerNode(b)
			},
			onNodeRemove : function(a, b) {
				this.unregisterNode(b)
			},
			getNodeById : function(a) {
				return this.nodeHash[a]
			},
			registerNode : function(a) {
				this.nodeHash[a.getId() || a.internalId] = a
			},
			unregisterNode : function(a) {
				delete this.nodeHash[a.getId() || a.internalId]
			},
			sort : function(b, a) {
				this.getRootNode().sort(b, a)
			},
			filter : function(b, a) {
				this.getRootNode().filter(b, a)
			}
		});
Ext.define("Ext.form.field.Field", {
			isFormField : true,
			disabled : false,
			submitValue : true,
			validateOnChange : true,
			suspendCheckChange : 0,
			initField : function() {
				this.addEvents("change", "validitychange", "dirtychange");
				this.initValue()
			},
			initValue : function() {
				var a = this;
				a.originalValue = a.lastValue = a.value;
				a.suspendCheckChange++;
				a.setValue(a.value);
				a.suspendCheckChange--
			},
			getName : function() {
				return this.name
			},
			getValue : function() {
				return this.value
			},
			setValue : function(b) {
				var a = this;
				a.value = b;
				a.checkChange();
				return a
			},
			isEqual : function(b, a) {
				return String(b) === String(a)
			},
			getSubmitData : function() {
				var a = this, b = null;
				if (!a.disabled && a.submitValue && !a.isFileUpload()) {
					b = {};
					b[a.getName()] = "" + a.getValue()
				}
				return b
			},
			getModelData : function() {
				var a = this, b = null;
				if (!a.disabled && !a.isFileUpload()) {
					b = {};
					b[a.getName()] = a.getValue()
				}
				return b
			},
			reset : function() {
				var a = this;
				a.setValue(a.originalValue);
				a.clearInvalid();
				delete a.wasValid
			},
			resetOriginalValue : function() {
				this.originalValue = this.getValue();
				this.checkDirty()
			},
			checkChange : function() {
				if (!this.suspendCheckChange) {
					var c = this, b = c.getValue(), a = c.lastValue;
					if (!c.isEqual(b, a) && !c.isDestroyed) {
						c.lastValue = b;
						c.fireEvent("change", c, b, a);
						c.onChange(b, a)
					}
				}
			},
			onChange : function(b, a) {
				if (this.validateOnChange) {
					this.validate()
				}
				this.checkDirty()
			},
			isDirty : function() {
				var a = this;
				return !a.disabled && !a.isEqual(a.getValue(), a.originalValue)
			},
			checkDirty : function() {
				var a = this, b = a.isDirty();
				if (b !== a.wasDirty) {
					a.fireEvent("dirtychange", a, b);
					a.onDirtyChange(b);
					a.wasDirty = b
				}
			},
			onDirtyChange : Ext.emptyFn,
			getErrors : function(a) {
				return []
			},
			isValid : function() {
				var a = this;
				return a.disabled || Ext.isEmpty(a.getErrors())
			},
			validate : function() {
				var a = this, b = a.isValid();
				if (b !== a.wasValid) {
					a.wasValid = b;
					a.fireEvent("validitychange", a, b)
				}
				return b
			},
			batchChanges : function(a) {
				this.suspendCheckChange++;
				a();
				this.suspendCheckChange--;
				this.checkChange()
			},
			isFileUpload : function() {
				return false
			},
			extractFileInput : function() {
				return null
			},
			markInvalid : Ext.emptyFn,
			clearInvalid : Ext.emptyFn
		});
Ext.define("Ext.dd.DragTracker", {
	uses : ["Ext.util.Region"],
	mixins : {
		observable : "Ext.util.Observable"
	},
	active : false,
	trackOver : false,
	tolerance : 5,
	autoStart : false,
	constructor : function(a) {
		Ext.apply(this, a);
		this.addEvents("mouseover", "mouseout", "mousedown", "mouseup",
				"mousemove", "dragstart", "dragend", "drag");
		this.dragRegion = Ext.create("Ext.util.Region", 0, 0, 0, 0);
		if (this.el) {
			this.initEl(this.el)
		}
		this.mixins.observable.constructor.call(this);
		if (this.disabled) {
			this.disable()
		}
	},
	initEl : function(a) {
		this.el = Ext.get(a);
		this.handle = Ext.get(this.delegate);
		this.delegate = this.handle ? undefined : this.delegate;
		if (!this.handle) {
			this.handle = this.el
		}
		this.mon(this.handle, {
					mousedown : this.onMouseDown,
					delegate : this.delegate,
					scope : this
				});
		if (this.trackOver || this.overCls) {
			this.mon(this.handle, {
						mouseover : this.onMouseOver,
						mouseout : this.onMouseOut,
						delegate : this.delegate,
						scope : this
					})
		}
	},
	disable : function() {
		this.disabled = true
	},
	enable : function() {
		this.disabled = false
	},
	destroy : function() {
		this.clearListeners();
		delete this.el
	},
	onMouseOver : function(c, b) {
		var a = this;
		if (!a.disabled) {
			if (Ext.EventManager.contains(c) || a.delegate) {
				a.mouseIsOut = false;
				if (a.overCls) {
					a.el.addCls(a.overCls)
				}
				a.fireEvent("mouseover", a, c, a.delegate ? c.getTarget(
								a.delegate, b) : a.handle)
			}
		}
	},
	onMouseOut : function(a) {
		if (this.mouseIsDown) {
			this.mouseIsOut = true
		} else {
			if (this.overCls) {
				this.el.removeCls(this.overCls)
			}
			this.fireEvent("mouseout", this, a)
		}
	},
	onMouseDown : function(b, a) {
		if (this.disabled || b.dragTracked) {
			return
		}
		this.dragTarget = this.delegate ? a : this.handle.dom;
		this.startXY = this.lastXY = b.getXY();
		this.startRegion = Ext.fly(this.dragTarget).getRegion();
		if (this.fireEvent("mousedown", this, b) !== false
				&& this.onBeforeStart(b) !== false) {
			this.mouseIsDown = true;
			b.dragTracked = true;
			if (this.preventDefault !== false) {
				b.preventDefault()
			}
			Ext.getDoc().on({
						scope : this,
						mouseup : this.onMouseUp,
						mousemove : this.onMouseMove,
						selectstart : this.stopSelect
					});
			if (this.autoStart) {
				this.timer = Ext.defer(this.triggerStart,
						this.autoStart === true ? 1000 : this.autoStart, this,
						[b])
			}
		}
	},
	onMouseMove : function(d, c) {
		if (this.active && Ext.isIE && !d.browserEvent.button) {
			d.preventDefault();
			this.onMouseUp(d);
			return
		}
		d.preventDefault();
		var b = d.getXY(), a = this.startXY;
		this.lastXY = b;
		if (!this.active) {
			if (Math.max(Math.abs(a[0] - b[0]), Math.abs(a[1] - b[1])) > this.tolerance) {
				this.triggerStart(d)
			} else {
				return
			}
		}
		if (this.fireEvent("mousemove", this, d) === false) {
			this.onMouseUp(d)
		} else {
			this.onDrag(d);
			this.fireEvent("drag", this, d)
		}
	},
	onMouseUp : function(a) {
		this.mouseIsDown = false;
		delete a.dragTracked;
		if (this.mouseIsOut) {
			this.mouseIsOut = false;
			this.onMouseOut(a)
		}
		a.preventDefault();
		this.fireEvent("mouseup", this, a);
		this.endDrag(a)
	},
	endDrag : function(c) {
		var b = Ext.getDoc(), a = this.active;
		b.un("mousemove", this.onMouseMove, this);
		b.un("mouseup", this.onMouseUp, this);
		b.un("selectstart", this.stopSelect, this);
		this.clearStart();
		this.active = false;
		if (a) {
			this.onEnd(c);
			this.fireEvent("dragend", this, c)
		}
		delete this._constrainRegion
	},
	triggerStart : function(a) {
		this.clearStart();
		this.active = true;
		this.onStart(a);
		this.fireEvent("dragstart", this, a)
	},
	clearStart : function() {
		if (this.timer) {
			clearTimeout(this.timer);
			delete this.timer
		}
	},
	stopSelect : function(a) {
		a.stopEvent();
		return false
	},
	onBeforeStart : function(a) {
	},
	onStart : function(a) {
	},
	onDrag : function(a) {
	},
	onEnd : function(a) {
	},
	getDragTarget : function() {
		return this.dragTarget
	},
	getDragCt : function() {
		return this.el
	},
	getConstrainRegion : function() {
		if (this.constrainTo) {
			if (this.constrainTo instanceof Ext.util.Region) {
				return this.constrainTo
			}
			if (!this._constrainRegion) {
				this._constrainRegion = Ext.fly(this.constrainTo)
						.getViewRegion()
			}
		} else {
			if (!this._constrainRegion) {
				this._constrainRegion = this.getDragCt().getViewRegion()
			}
		}
		return this._constrainRegion
	},
	getXY : function(a) {
		return a ? this.constrainModes[a].call(this, this.lastXY) : this.lastXY
	},
	getOffset : function(c) {
		var b = this.getXY(c), a = this.startXY;
		return [b[0] - a[0], b[1] - a[1]]
	},
	constrainModes : {
		point : function(c) {
			var b = this.dragRegion, a = this.getConstrainRegion();
			if (!a) {
				return c
			}
			b.x = b.left = b[0] = b.right = c[0];
			b.y = b.top = b[1] = b.bottom = c[1];
			b.constrainTo(a);
			return [b.left, b.top]
		},
		dragTarget : function(e) {
			var b = this.startXY, d = this.startRegion.copy(), a = this
					.getConstrainRegion(), c;
			if (!a) {
				return e
			}
			d.translateBy.apply(d, [e[0] - b[0], e[1] - b[1]]);
			if (d.right > a.right) {
				e[0] += c = (a.right - d.right);
				d.left += c
			}
			if (d.left < a.left) {
				e[0] += (a.left - d.left)
			}
			if (d.bottom > a.bottom) {
				e[1] += c = (a.bottom - d.bottom);
				d.top += c
			}
			if (d.top < a.top) {
				e[1] += (a.top - d.top)
			}
			return e
		}
	}
});
Ext.define("Ext.util.Offset", {
			statics : {
				fromObject : function(a) {
					return new this(a.x, a.y)
				}
			},
			constructor : function(a, b) {
				this.x = (a != null && !isNaN(a)) ? a : 0;
				this.y = (b != null && !isNaN(b)) ? b : 0;
				return this
			},
			copy : function() {
				return new Ext.util.Offset(this.x, this.y)
			},
			copyFrom : function(a) {
				this.x = a.x;
				this.y = a.y
			},
			toString : function() {
				return "Offset[" + this.x + "," + this.y + "]"
			},
			equals : function(a) {
				return (this.x == a.x && this.y == a.y)
			},
			round : function(b) {
				if (!isNaN(b)) {
					var a = Math.pow(10, b);
					this.x = Math.round(this.x * a) / a;
					this.y = Math.round(this.y * a) / a
				} else {
					this.x = Math.round(this.x);
					this.y = Math.round(this.y)
				}
			},
			isZero : function() {
				return this.x == 0 && this.y == 0
			}
		});
Ext.define("Ext.ComponentQuery", {
			singleton : true,
			uses : ["Ext.ComponentManager"]
		}, function() {
			var g = this, j = ["var r = [],", "i = 0,", "it = items,",
					"l = it.length,", "c;", "for (; i < l; i++) {",
					"c = it[i];", "if (c.{0}) {", "r.push(c);", "}", "}",
					"return r;"].join(""), e = function(o, n) {
				return n.method.apply(this, [o].concat(n.args))
			}, a = function(p, t) {
				var n = [], q = 0, s = p.length, r, o = t !== ">";
				for (; q < s; q++) {
					r = p[q];
					if (r.getRefItems) {
						n = n.concat(r.getRefItems(o))
					}
				}
				return n
			}, f = function(o) {
				var n = [], p = 0, r = o.length, q;
				for (; p < r; p++) {
					q = o[p];
					while (!!(q = (q.ownerCt || q.floatParent))) {
						n.push(q)
					}
				}
				return n
			}, l = function(o, t, s) {
				if (t === "*") {
					return o.slice()
				} else {
					var n = [], p = 0, r = o.length, q;
					for (; p < r; p++) {
						q = o[p];
						if (q.isXType(t, s)) {
							n.push(q)
						}
					}
					return n
				}
			}, i = function(o, r) {
				var t = Ext.Array, n = [], p = 0, s = o.length, q;
				for (; p < s; p++) {
					q = o[p];
					if (q.el ? q.el.hasCls(r) : t.contains(q.initCls(), r)) {
						n.push(q)
					}
				}
				return n
			}, m = function(p, u, o, t) {
				var n = [], q = 0, s = p.length, r;
				for (; q < s; q++) {
					r = p[q];
					if (!t ? !!r[u] : (String(r[u]) === t)) {
						n.push(r)
					}
				}
				return n
			}, d = function(o, s) {
				var n = [], p = 0, r = o.length, q;
				for (; p < r; p++) {
					q = o[p];
					if (q.getItemId() === s) {
						n.push(q)
					}
				}
				return n
			}, k = function(n, o, p) {
				return g.pseudos[o](n, p)
			}, h = /^(\s?([>\^])\s?|\s|$)/, c = /^(#)?([\w\-]+|\*)(?:\((true|false)\))?/, b = [
					{
						re : /^\.([\w\-]+)(?:\((true|false)\))?/,
						method : l
					}, {
						re : /^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,
						method : m
					}, {
						re : /^#([\w\-]+)/,
						method : d
					}, {
						re : /^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,
						method : k
					}, {
						re : /^(?:\{([^\}]+)\})/,
						method : j
					}];
			g.Query = Ext.extend(Object, {
				constructor : function(n) {
					n = n || {};
					Ext.apply(this, n)
				},
				execute : function(o) {
					var q = this.operations, r = 0, s = q.length, p, n;
					if (!o) {
						n = Ext.ComponentManager.all.getArray()
					} else {
						if (Ext.isArray(o)) {
							n = o
						}
					}
					for (; r < s; r++) {
						p = q[r];
						if (p.mode === "^") {
							n = f(n || [o])
						} else {
							if (p.mode) {
								n = a(n || [o], p.mode)
							} else {
								n = e(n || a([o]), p)
							}
						}
						if (r === s - 1) {
							return n
						}
					}
					return []
				},
				is : function(p) {
					var o = this.operations, s = Ext.isArray(p) ? p : [p], n = s.length, t = o[o.length
							- 1], r, q;
					s = e(s, t);
					if (s.length === n) {
						if (o.length > 1) {
							for (q = 0, r = s.length; q < r; q++) {
								if (Ext.Array.indexOf(this.execute(), s[q]) === -1) {
									return false
								}
							}
						}
						return true
					}
					return false
				}
			});
			Ext.apply(this, {
				cache : {},
				pseudos : {
					not : function(t, n) {
						var u = Ext.ComponentQuery, r = 0, s = t.length, q = [], p = -1, o;
						for (; r < s; ++r) {
							o = t[r];
							if (!u.is(o, n)) {
								q[++p] = o
							}
						}
						return q
					}
				},
				query : function(o, v) {
					var w = o.split(","), n = w.length, p = 0, q = [], x = [], u = {}, s, r, t;
					for (; p < n; p++) {
						o = Ext.String.trim(w[p]);
						s = this.cache[o];
						if (!s) {
							this.cache[o] = s = this.parse(o)
						}
						q = q.concat(s.execute(v))
					}
					if (n > 1) {
						r = q.length;
						for (p = 0; p < r; p++) {
							t = q[p];
							if (!u[t.id]) {
								x.push(t);
								u[t.id] = true
							}
						}
						q = x
					}
					return q
				},
				is : function(o, n) {
					if (!n) {
						return true
					}
					var p = this.cache[n];
					if (!p) {
						this.cache[n] = p = this.parse(n)
					}
					return p.is(o)
				},
				parse : function(q) {
					var o = [], p = b.length, u, r, v, w, x, s, t, n;
					while (q && u !== q) {
						u = q;
						r = q.match(c);
						if (r) {
							v = r[1];
							if (v === "#") {
								o.push({
											method : d,
											args : [Ext.String.trim(r[2])]
										})
							} else {
								if (v === ".") {
									o.push({
												method : i,
												args : [Ext.String.trim(r[2])]
											})
								} else {
									o.push({
												method : l,
												args : [Ext.String.trim(r[2]),
														Boolean(r[3])]
											})
								}
							}
							q = q.replace(r[0], "")
						}
						while (!(w = q.match(h))) {
							for (s = 0; q && s < p; s++) {
								t = b[s];
								x = q.match(t.re);
								n = t.method;
								if (x) {
									o.push({
										method : Ext.isString(t.method)
												? Ext
														.functionFactory(
																"items",
																Ext.String.format
																		.apply(
																				Ext.String,
																				[n]
																						.concat(x
																								.slice(1))))
												: t.method,
										args : x.slice(1)
									});
									q = q.replace(x[0], "");
									break
								}
							}
						}
						if (w[1]) {
							o.push({
										mode : w[2] || w[1]
									});
							q = q.replace(w[0], "")
						}
					}
					return new g.Query({
								operations : o
							})
				}
			})
		});
Ext.define("Ext.util.HashMap", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			constructor : function(a) {
				var b = this;
				b.addEvents("add", "clear", "remove", "replace");
				b.mixins.observable.constructor.call(b, a);
				b.clear(true)
			},
			getCount : function() {
				return this.length
			},
			getData : function(a, b) {
				if (b === undefined) {
					b = a;
					a = this.getKey(b)
				}
				return [a, b]
			},
			getKey : function(a) {
				return a.id
			},
			add : function(a, d) {
				var b = this, c;
				if (arguments.length === 1) {
					d = a;
					a = b.getKey(d)
				}
				if (b.containsKey(a)) {
					b.replace(a, d)
				}
				c = b.getData(a, d);
				a = c[0];
				d = c[1];
				b.map[a] = d;
				++b.length;
				b.fireEvent("add", b, a, d);
				return d
			},
			replace : function(b, d) {
				var c = this, e = c.map, a;
				if (!c.containsKey(b)) {
					c.add(b, d)
				}
				a = e[b];
				e[b] = d;
				c.fireEvent("replace", c, b, d, a);
				return d
			},
			remove : function(b) {
				var a = this.findKey(b);
				if (a !== undefined) {
					return this.removeAtKey(a)
				}
				return false
			},
			removeAtKey : function(a) {
				var b = this, c;
				if (b.containsKey(a)) {
					c = b.map[a];
					delete b.map[a];
					--b.length;
					b.fireEvent("remove", b, a, c);
					return true
				}
				return false
			},
			get : function(a) {
				return this.map[a]
			},
			clear : function(a) {
				var b = this;
				b.map = {};
				b.length = 0;
				if (a !== true) {
					b.fireEvent("clear", b)
				}
				return b
			},
			containsKey : function(a) {
				return this.map[a] !== undefined
			},
			contains : function(a) {
				return this.containsKey(this.findKey(a))
			},
			getKeys : function() {
				return this.getArray(true)
			},
			getValues : function() {
				return this.getArray(false)
			},
			getArray : function(d) {
				var a = [], b, c = this.map;
				for (b in c) {
					if (c.hasOwnProperty(b)) {
						a.push(d ? b : c[b])
					}
				}
				return a
			},
			each : function(d, c) {
				var a = Ext.apply({}, this.map), b, e = this.length;
				c = c || this;
				for (b in a) {
					if (a.hasOwnProperty(b)) {
						if (d.call(c, b, a[b], e) === false) {
							break
						}
					}
				}
				return this
			},
			clone : function() {
				var c = new this.self(), b = this.map, a;
				c.suspendEvents();
				for (a in b) {
					if (b.hasOwnProperty(a)) {
						c.add(a, b[a])
					}
				}
				c.resumeEvents();
				return c
			},
			findKey : function(b) {
				var a, c = this.map;
				for (a in c) {
					if (c.hasOwnProperty(a) && c[a] === b) {
						return a
					}
				}
				return undefined
			}
		});
Ext.define("Ext.util.KeyNav", {
	alternateClassName : "Ext.KeyNav",
	requires : ["Ext.util.KeyMap"],
	statics : {
		keyOptions : {
			left : 37,
			right : 39,
			up : 38,
			down : 40,
			space : 32,
			pageUp : 33,
			pageDown : 34,
			del : 46,
			backspace : 8,
			home : 36,
			end : 35,
			enter : 13,
			esc : 27,
			tab : 9
		}
	},
	constructor : function(b, a) {
		this.setConfig(b, a || {})
	},
	setConfig : function(d, a) {
		if (this.map) {
			this.map.destroy()
		}
		var f = Ext.create("Ext.util.KeyMap", d, null, this
						.getKeyEvent("forceKeyDown" in a
								? a.forceKeyDown
								: this.forceKeyDown)), e = Ext.util.KeyNav.keyOptions, c = a.scope
				|| this, b;
		this.map = f;
		for (b in e) {
			if (e.hasOwnProperty(b)) {
				if (a[b]) {
					f.addBinding({
								scope : c,
								key : e[b],
								handler : Ext.Function.bind(this.handleEvent,
										c, [a[b]], true),
								defaultEventAction : a.defaultEventAction
										|| this.defaultEventAction
							})
				}
			}
		}
		f.disable();
		if (!a.disabled) {
			f.enable()
		}
	},
	handleEvent : function(c, b, a) {
		return a.call(this, b)
	},
	disabled : false,
	defaultEventAction : "stopEvent",
	forceKeyDown : false,
	destroy : function(a) {
		this.map.destroy(a);
		delete this.map
	},
	enable : function() {
		this.map.enable();
		this.disabled = false
	},
	disable : function() {
		this.map.disable();
		this.disabled = true
	},
	setDisabled : function(a) {
		this.map.setDisabled(a);
		this.disabled = a
	},
	getKeyEvent : function(a) {
		return (a || Ext.EventManager.useKeyDown) ? "keydown" : "keypress"
	}
});
Ext.define("Ext.util.Floating", {
	uses : ["Ext.Layer", "Ext.window.Window"],
	focusOnToFront : true,
	shadow : "sides",
	constructor : function(a) {
		this.floating = true;
		this.el = Ext.create("Ext.Layer", Ext.apply({}, a, {
					hideMode : this.hideMode,
					hidden : this.hidden,
					shadow : Ext.isDefined(this.shadow) ? this.shadow : "sides",
					shadowOffset : this.shadowOffset,
					constrain : false,
					shim : this.shim === false ? false : undefined
				}), this.el)
	},
	onFloatRender : function() {
		var a = this;
		a.zIndexParent = a.getZIndexParent();
		a.setFloatParent(a.ownerCt);
		delete a.ownerCt;
		if (a.zIndexParent) {
			a.zIndexParent.registerFloatingItem(a)
		} else {
			Ext.WindowManager.register(a)
		}
	},
	setFloatParent : function(b) {
		var a = this;
		if (a.floatParent) {
			a.mun(a.floatParent, {
						hide : a.onFloatParentHide,
						show : a.onFloatParentShow,
						scope : a
					})
		}
		a.floatParent = b;
		if (b) {
			a.mon(a.floatParent, {
						hide : a.onFloatParentHide,
						show : a.onFloatParentShow,
						scope : a
					})
		}
		if ((a.constrain || a.constrainHeader) && !a.constrainTo) {
			a.constrainTo = b ? b.getTargetEl() : a.container
		}
	},
	onFloatParentHide : function() {
		this.showOnParentShow = this.isVisible();
		this.hide()
	},
	onFloatParentShow : function() {
		if (this.showOnParentShow) {
			delete this.showOnParentShow;
			this.show()
		}
	},
	getZIndexParent : function() {
		var a = this.ownerCt, b;
		if (a) {
			while (a) {
				b = a;
				a = a.ownerCt
			}
			if (b.floating) {
				return b
			}
		}
	},
	setZIndex : function(a) {
		var b = this;
		this.el.setZIndex(a);
		a += 10;
		if (b.floatingItems) {
			a = Math.floor(b.floatingItems.setBase(a) / 100) * 100 + 10000
		}
		return a
	},
	doConstrain : function(c) {
		var d = this, a, b, e;
		if (d.constrain || d.constrainHeader) {
			if (d.constrainHeader) {
				a = d.header.el
			} else {
				a = d.el
			}
			b = a.getConstrainVector(c
					|| (d.floatParent && d.floatParent.getTargetEl())
					|| d.container);
			if (b) {
				e = d.getPosition();
				e[0] += b[0];
				e[1] += b[1];
				d.setPosition(e)
			}
		}
	},
	alignTo : function(b, a, c) {
		if (b.isComponent) {
			b = b.getEl()
		}
		var d = this.el.getAlignToXY(b, a, c);
		this.setPagePosition(d);
		return this
	},
	toFront : function(b) {
		var a = this;
		if (a.zIndexParent) {
			a.zIndexParent.toFront(true)
		}
		if (a.zIndexManager.bringToFront(a)) {
			if (!Ext.isDefined(b)) {
				b = !a.focusOnToFront
			}
			if (!b) {
				a.focus(false, true)
			}
		}
		return a
	},
	setActive : function(a, b) {
		if (a) {
			if ((this instanceof Ext.window.Window) && !this.maximized) {
				this.el.enableShadow(true)
			}
			this.fireEvent("activate", this)
		} else {
			if ((this instanceof Ext.window.Window)
					&& (b instanceof Ext.window.Window)) {
				this.el.disableShadow()
			}
			this.fireEvent("deactivate", this)
		}
	},
	toBack : function() {
		this.zIndexManager.sendToBack(this);
		return this
	},
	center : function() {
		var a = this.el.getAlignToXY(this.container, "c-c");
		this.setPagePosition(a);
		return this
	},
	syncShadow : function() {
		if (this.floating) {
			this.el.sync(true)
		}
	},
	fitContainer : function() {
		var c = this.floatParent, a = c ? c.getTargetEl() : this.container, b = a
				.getViewSize(false);
		this.setSize(b)
	}
});
Ext.define("Ext.layout.container.boxOverflow.None", {
			alternateClassName : "Ext.layout.boxOverflow.None",
			constructor : function(b, a) {
				this.layout = b;
				Ext.apply(this, a || {})
			},
			handleOverflow : Ext.emptyFn,
			clearOverflow : Ext.emptyFn,
			getItem : function(a) {
				return this.layout.owner.getComponent(a)
			}
		});
Ext.define("Ext.layout.container.boxOverflow.Scroller", {
	extend : "Ext.layout.container.boxOverflow.None",
	requires : ["Ext.util.ClickRepeater", "Ext.core.Element"],
	alternateClassName : "Ext.layout.boxOverflow.Scroller",
	mixins : {
		observable : "Ext.util.Observable"
	},
	animateScroll : false,
	scrollIncrement : 20,
	wheelIncrement : 10,
	scrollRepeatInterval : 60,
	scrollDuration : 400,
	scrollerCls : Ext.baseCSSPrefix + "box-scroller",
	constructor : function(b, a) {
		this.layout = b;
		Ext.apply(this, a || {});
		this.addEvents("scroll")
	},
	initCSSClasses : function() {
		var b = this, a = b.layout;
		if (!b.CSSinitialized) {
			b.beforeCtCls = b.beforeCtCls || Ext.baseCSSPrefix
					+ "box-scroller-" + a.parallelBefore;
			b.afterCtCls = b.afterCtCls || Ext.baseCSSPrefix + "box-scroller-"
					+ a.parallelAfter;
			b.beforeScrollerCls = b.beforeScrollerCls || Ext.baseCSSPrefix
					+ a.owner.getXType() + "-scroll-" + a.parallelBefore;
			b.afterScrollerCls = b.afterScrollerCls || Ext.baseCSSPrefix
					+ a.owner.getXType() + "-scroll-" + a.parallelAfter;
			b.CSSinitializes = true
		}
	},
	handleOverflow : function(a, f) {
		var e = this, d = e.layout, c = "get" + d.parallelPrefixCap, b = {};
		e.initCSSClasses();
		e.callParent(arguments);
		this.createInnerElements();
		this.showScrollers();
		b[d.perpendicularPrefix] = f[d.perpendicularPrefix];
		b[d.parallelPrefix] = f[d.parallelPrefix]
				- (e.beforeCt[c]() + e.afterCt[c]());
		return {
			targetSize : b
		}
	},
	createInnerElements : function() {
		var a = this, b = a.layout.getRenderTarget();
		if (!a.beforeCt) {
			b.addCls(Ext.baseCSSPrefix + a.layout.direction
					+ "-box-overflow-body");
			a.beforeCt = b.insertSibling({
						cls : Ext.layout.container.Box.prototype.innerCls + " "
								+ a.beforeCtCls
					}, "before");
			a.afterCt = b.insertSibling({
						cls : Ext.layout.container.Box.prototype.innerCls + " "
								+ a.afterCtCls
					}, "after");
			a.createWheelListener()
		}
	},
	createWheelListener : function() {
		this.layout.innerCt.on({
					scope : this,
					mousewheel : function(a) {
						a.stopEvent();
						this.scrollBy(a.getWheelDelta() * this.wheelIncrement
										* -1, false)
					}
				})
	},
	clearOverflow : function() {
		this.hideScrollers()
	},
	showScrollers : function() {
		this.createScrollers();
		this.beforeScroller.show();
		this.afterScroller.show();
		this.updateScrollButtons();
		this.layout.owner.addClsWithUI("scroller")
	},
	hideScrollers : function() {
		if (this.beforeScroller != undefined) {
			this.beforeScroller.hide();
			this.afterScroller.hide();
			this.layout.owner.removeClsWithUI("scroller")
		}
	},
	createScrollers : function() {
		if (!this.beforeScroller && !this.afterScroller) {
			var a = this.beforeCt.createChild({
						cls : Ext.String.format("{0} {1} ", this.scrollerCls,
								this.beforeScrollerCls)
					});
			var b = this.afterCt.createChild({
						cls : Ext.String.format("{0} {1}", this.scrollerCls,
								this.afterScrollerCls)
					});
			a.addClsOnOver(this.beforeScrollerCls + "-hover");
			b.addClsOnOver(this.afterScrollerCls + "-hover");
			a.setVisibilityMode(Ext.core.Element.DISPLAY);
			b.setVisibilityMode(Ext.core.Element.DISPLAY);
			this.beforeRepeater = Ext.create("Ext.util.ClickRepeater", a, {
						interval : this.scrollRepeatInterval,
						handler : this.scrollLeft,
						scope : this
					});
			this.afterRepeater = Ext.create("Ext.util.ClickRepeater", b, {
						interval : this.scrollRepeatInterval,
						handler : this.scrollRight,
						scope : this
					});
			this.beforeScroller = a;
			this.afterScroller = b
		}
	},
	destroy : function() {
		Ext.destroy(this.beforeRepeater, this.afterRepeater,
				this.beforeScroller, this.afterScroller, this.beforeCt,
				this.afterCt)
	},
	scrollBy : function(b, a) {
		this.scrollTo(this.getScrollPosition() + b, a)
	},
	getScrollAnim : function() {
		return {
			duration : this.scrollDuration,
			callback : this.updateScrollButtons,
			scope : this
		}
	},
	updateScrollButtons : function() {
		if (this.beforeScroller == undefined || this.afterScroller == undefined) {
			return
		}
		var d = this.atExtremeBefore() ? "addCls" : "removeCls", c = this
				.atExtremeAfter() ? "addCls" : "removeCls", a = this.beforeScrollerCls
				+ "-disabled", b = this.afterScrollerCls + "-disabled";
		this.beforeScroller[d](a);
		this.afterScroller[c](b);
		this.scrolling = false
	},
	atExtremeBefore : function() {
		return this.getScrollPosition() === 0
	},
	scrollLeft : function() {
		this.scrollBy(-this.scrollIncrement, false)
	},
	scrollRight : function() {
		this.scrollBy(this.scrollIncrement, false)
	},
	getScrollPosition : function() {
		var a = this.layout;
		return parseInt(a.innerCt.dom["scroll" + a.parallelBeforeCap], 10) || 0
	},
	getMaxScrollPosition : function() {
		var a = this.layout;
		return a.innerCt.dom["scroll" + a.parallelPrefixCap]
				- this.layout.innerCt["get" + a.parallelPrefixCap]()
	},
	atExtremeAfter : function() {
		return this.getScrollPosition() >= this.getMaxScrollPosition()
	},
	scrollTo : function(a, b) {
		var f = this, e = f.layout, d = f.getScrollPosition(), c = Ext.Number
				.constrain(a, 0, f.getMaxScrollPosition());
		if (c != d && !f.scrolling) {
			if (b == undefined) {
				b = f.animateScroll
			}
			e.innerCt.scrollTo(e.parallelBefore, c, b
							? f.getScrollAnim()
							: false);
			if (b) {
				f.scrolling = true
			} else {
				f.scrolling = false;
				f.updateScrollButtons()
			}
			f.fireEvent("scroll", f, c, b ? f.getScrollAnim() : false)
		}
	},
	scrollToItem : function(g, b) {
		var f = this, e = f.layout, a, d, c;
		g = f.getItem(g);
		if (g != undefined) {
			a = this.getItemVisibility(g);
			if (!a.fullyVisible) {
				d = g.getBox(true, true);
				c = d[e.parallelPosition];
				if (a.hiddenEnd) {
					c -= (this.layout.innerCt["get" + e.parallelPrefixCap]() - d[e.parallelPrefix])
				}
				this.scrollTo(c, b)
			}
		}
	},
	getItemVisibility : function(f) {
		var e = this, d = e.getItem(f).getBox(true, true), c = e.layout, b = d[c.parallelPosition], g = b
				+ d[c.parallelPrefix], h = e.getScrollPosition(), a = h
				+ c.innerCt["get" + c.parallelPrefixCap]();
		return {
			hiddenStart : b < h,
			hiddenEnd : g > a,
			fullyVisible : b > h && g < a
		}
	}
});
Ext.define("Ext.AbstractManager", {
			requires : ["Ext.util.HashMap"],
			typeName : "type",
			constructor : function(a) {
				Ext.apply(this, a || {});
				this.all = Ext.create("Ext.util.HashMap");
				this.types = {}
			},
			get : function(a) {
				return this.all.get(a)
			},
			register : function(a) {
				this.all.add(a)
			},
			unregister : function(a) {
				this.all.remove(a)
			},
			registerType : function(b, a) {
				this.types[b] = a;
				a[this.typeName] = b
			},
			isRegistered : function(a) {
				return this.types[a] !== undefined
			},
			create : function(a, d) {
				var b = a[this.typeName] || a.type || d, c = this.types[b];
				return new c(a)
			},
			onAvailable : function(e, c, b) {
				var a = this.all, d;
				if (a.containsKey(e)) {
					d = a.get(e);
					c.call(b || d, d)
				} else {
					a.on("add", function(h, f, g) {
								if (f == e) {
									c.call(b || g, g);
									a.un("add", c, b)
								}
							})
				}
			},
			each : function(b, a) {
				this.all.each(b, a || this)
			},
			getCount : function() {
				return this.all.getCount()
			}
		});
Ext.define("Ext.data.Association", {
	primaryKey : "id",
	defaultReaderType : "json",
	statics : {
		create : function(a) {
			if (!a.isAssociation) {
				if (Ext.isString(a)) {
					a = {
						type : a
					}
				}
				switch (a.type) {
					case "belongsTo" :
						return Ext.create("Ext.data.BelongsToAssociation", a);
					case "hasMany" :
						return Ext.create("Ext.data.HasManyAssociation", a);
					default :
				}
			}
			return a
		}
	},
	constructor : function(b) {
		Ext.apply(this, b);
		var c = Ext.ModelManager.types, d = b.ownerModel, f = b.associatedModel, e = c[d], g = c[f], a;
		this.ownerModel = e;
		this.associatedModel = g;
		Ext.applyIf(this, {
					ownerName : d,
					associatedName : f
				})
	},
	getReader : function() {
		var c = this, a = c.reader, b = c.associatedModel;
		if (a) {
			if (Ext.isString(a)) {
				a = {
					type : a
				}
			}
			if (a.isReader) {
				a.setModel(b)
			} else {
				Ext.applyIf(a, {
							model : b,
							type : c.defaultReaderType
						})
			}
			c.reader = Ext.createByAlias("reader." + a.type, a)
		}
		return c.reader || null
	}
});
Ext.define("Ext.data.SortTypes", {
			singleton : true,
			none : function(a) {
				return a
			},
			stripTagsRE : /<\/?[^>]+>/gi,
			asText : function(a) {
				return String(a).replace(this.stripTagsRE, "")
			},
			asUCText : function(a) {
				return String(a).toUpperCase().replace(this.stripTagsRE, "")
			},
			asUCString : function(a) {
				return String(a).toUpperCase()
			},
			asDate : function(a) {
				if (!a) {
					return 0
				}
				if (Ext.isDate(a)) {
					return a.getTime()
				}
				return Date.parse(String(a))
			},
			asFloat : function(a) {
				var b = parseFloat(String(a).replace(/,/g, ""));
				return isNaN(b) ? 0 : b
			},
			asInt : function(a) {
				var b = parseInt(String(a).replace(/,/g, ""), 10);
				return isNaN(b) ? 0 : b
			}
		});
Ext.define("Ext.fx.CubicBezier", {
			singleton : true,
			cubicBezierAtTime : function(n, d, b, m, l, h) {
				var i = 3 * d, k = 3 * (m - d) - i, a = 1 - i - k, g = 3 * b, j = 3
						* (l - b) - g, o = 1 - g - j;
				function f(p) {
					return ((a * p + k) * p + i) * p
				}
				function c(p, r) {
					var q = e(p, r);
					return ((o * q + j) * q + g) * q
				}
				function e(p, w) {
					var v, u, s, q, t, r;
					for (s = p, r = 0; r < 8; r++) {
						q = f(s) - p;
						if (Math.abs(q) < w) {
							return s
						}
						t = (3 * a * s + 2 * k) * s + i;
						if (Math.abs(t) < 0.000001) {
							break
						}
						s = s - q / t
					}
					v = 0;
					u = 1;
					s = p;
					if (s < v) {
						return v
					}
					if (s > u) {
						return u
					}
					while (v < u) {
						q = f(s);
						if (Math.abs(q - p) < w) {
							return s
						}
						if (p > q) {
							v = s
						} else {
							u = s
						}
						s = (u - v) / 2 + v
					}
					return s
				}
				return c(n, 1 / (200 * h))
			},
			cubicBezier : function(b, e, a, c) {
				var d = function(f) {
					return Ext.fx.CubicBezier.cubicBezierAtTime(f, b, e, a, c,
							1)
				};
				d.toCSS3 = function() {
					return "cubic-bezier(" + [b, e, a, c].join(",") + ")"
				};
				d.reverse = function() {
					return Ext.fx.CubicBezier.cubicBezier(1 - a, 1 - c, 1 - b,
							1 - e)
				};
				return d
			}
		});
Ext.define("Ext.fx.PropertyHandler", {
	requires : ["Ext.draw.Draw"],
	statics : {
		defaultHandler : {
			pixelDefaults : ["width", "height", "top", "left"],
			unitRE : /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,
			computeDelta : function(h, b, f, e, a) {
				f = (typeof f == "number") ? f : 1;
				var d = this.unitRE.exec(h), g, c;
				if (d) {
					h = d[1];
					c = d[2];
					if (!c && Ext.Array.contains(this.pixelDefaults, a)) {
						c = "px"
					}
				}
				h = +h || 0;
				d = this.unitRE.exec(b);
				if (d) {
					b = d[1];
					c = d[2] || c
				}
				b = +b || 0;
				g = (e != null) ? e : h;
				return {
					from : h,
					delta : (b - g) * f,
					units : c
				}
			},
			get : function(n, b, a, m, h) {
				var l = n.length, d = [], e, g, k, c, f;
				for (e = 0; e < l; e++) {
					if (m) {
						g = m[e][1].from
					}
					if (Ext.isArray(n[e][1]) && Ext.isArray(b)) {
						k = [];
						c = 0;
						f = n[e][1].length;
						for (; c < f; c++) {
							k
									.push(this.computeDelta(n[e][1][c], b[c],
											a, g, h))
						}
						d.push([n[e][0], k])
					} else {
						d
								.push([n[e][0],
										this.computeDelta(n[e][1], b, a, g, h)])
					}
				}
				return d
			},
			set : function(k, f) {
				var g = k.length, c = [], d, a, h, e, b;
				for (d = 0; d < g; d++) {
					a = k[d][1];
					if (Ext.isArray(a)) {
						h = [];
						b = 0;
						e = a.length;
						for (; b < e; b++) {
							h.push(a[b].from + (a[b].delta * f)
									+ (a[b].units || 0))
						}
						c.push([k[d][0], h])
					} else {
						c.push([k[d][0],
								a.from + (a.delta * f) + (a.units || 0)])
					}
				}
				return c
			}
		},
		color : {
			rgbRE : /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,
			hexRE : /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,
			hex3RE : /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,
			parseColor : function(a, d) {
				d = (typeof d == "number") ? d : 1;
				var e, c = false, b;
				Ext.each([this.hexRE, this.rgbRE, this.hex3RE], function(g, f) {
							e = (f % 2 == 0) ? 16 : 10;
							b = g.exec(a);
							if (b && b.length == 4) {
								if (f == 2) {
									b[1] += b[1];
									b[2] += b[2];
									b[3] += b[3]
								}
								c = {
									red : parseInt(b[1], e),
									green : parseInt(b[2], e),
									blue : parseInt(b[3], e)
								};
								return false
							}
						});
				return c || a
			},
			computeDelta : function(g, a, e, c) {
				g = this.parseColor(g);
				a = this.parseColor(a, e);
				var f = c ? c : g, b = typeof f, d = typeof a;
				if (b == "string" || b == "undefined" || d == "string"
						|| d == "undefined") {
					return a || f
				}
				return {
					from : g,
					delta : {
						red : Math.round((a.red - f.red) * e),
						green : Math.round((a.green - f.green) * e),
						blue : Math.round((a.blue - f.blue) * e)
					}
				}
			},
			get : function(h, a, f, d) {
				var g = h.length, c = [], e, b;
				for (e = 0; e < g; e++) {
					if (d) {
						b = d[e][1].from
					}
					c.push([h[e][0], this.computeDelta(h[e][1], a, f, b)])
				}
				return c
			},
			set : function(j, e) {
				var f = j.length, c = [], d, b, a, g, h;
				for (d = 0; d < f; d++) {
					b = j[d][1];
					if (b) {
						g = b.from;
						h = b.delta;
						b = (typeof b == "object" && "red" in b)
								? "rgb(" + b.red + ", " + b.green + ", "
										+ b.blue + ")"
								: b;
						b = (typeof b == "object" && b.length) ? b[0] : b;
						if (typeof b == "undefined") {
							return []
						}
						a = typeof b == "string"
								? b
								: "rgb("
										+ [
												(g.red + Math.round(h.red * e))
														% 256,
												(g.green + Math.round(h.green
														* e))
														% 256,
												(g.blue + Math
														.round(h.blue * e))
														% 256].join(",") + ")";
						c.push([j[d][0], a])
					}
				}
				return c
			}
		},
		object : {
			interpolate : function(d, b) {
				b = (typeof b == "number") ? b : 1;
				var a = {}, c;
				for (c in d) {
					a[c] = parseInt(d[c], 10) * b
				}
				return a
			},
			computeDelta : function(g, a, c, b) {
				g = this.interpolate(g);
				a = this.interpolate(a, c);
				var f = b ? b : g, e = {}, d;
				for (d in a) {
					e[d] = a[d] - f[d]
				}
				return {
					from : g,
					delta : e
				}
			},
			get : function(h, a, f, d) {
				var g = h.length, c = [], e, b;
				for (e = 0; e < g; e++) {
					if (d) {
						b = d[e][1].from
					}
					c.push([h[e][0], this.computeDelta(h[e][1], a, f, b)])
				}
				return c
			},
			set : function(k, f) {
				var g = k.length, c = [], e = {}, d, h, j, b, a;
				for (d = 0; d < g; d++) {
					b = k[d][1];
					h = b.from;
					j = b.delta;
					for (a in h) {
						e[a] = Math.round(h[a] + j[a] * f)
					}
					c.push([k[d][0], e])
				}
				return c
			}
		},
		path : {
			computeDelta : function(e, a, c, b) {
				c = (typeof c == "number") ? c : 1;
				var d;
				e = +e || 0;
				a = +a || 0;
				d = (b != null) ? b : e;
				return {
					from : e,
					delta : (a - d) * c
				}
			},
			forcePath : function(a) {
				if (!Ext.isArray(a) && !Ext.isArray(a[0])) {
					a = Ext.draw.Draw.parsePathString(a)
				}
				return a
			},
			get : function(b, h, a, p) {
				var c = this.forcePath(h), m = [], r = b.length, d, g, n, f, o, l, e, s, q;
				for (n = 0; n < r; n++) {
					q = this.forcePath(b[n][1]);
					f = Ext.draw.Draw.interpolatePaths(q, c);
					q = f[0];
					c = f[1];
					d = q.length;
					s = [];
					for (l = 0; l < d; l++) {
						f = [q[l][0]];
						g = q[l].length;
						for (e = 1; e < g; e++) {
							o = p && p[0][1][l][e].from;
							f.push(this.computeDelta(q[l][e], c[l][e], a, o))
						}
						s.push(f)
					}
					m.push([b[n][0], s])
				}
				return m
			},
			set : function(o, m) {
				var n = o.length, e = [], g, f, d, h, l, c, a, b;
				for (g = 0; g < n; g++) {
					c = o[g][1];
					h = [];
					a = c.length;
					for (f = 0; f < a; f++) {
						l = [c[f][0]];
						b = c[f].length;
						for (d = 1; d < b; d++) {
							l.push(c[f][d].from + c[f][d].delta * m)
						}
						h.push(l.join(","))
					}
					e.push([o[g][0], h.join(",")])
				}
				return e
			}
		}
	}
}, function() {
	Ext.each(["outlineColor", "backgroundColor", "borderColor",
					"borderTopColor", "borderRightColor", "borderBottomColor",
					"borderLeftColor", "fill", "stroke"], function(a) {
				this[a] = this.color
			}, this)
});
Ext.define("Ext.util.Animate", {
			uses : ["Ext.fx.Manager", "Ext.fx.Anim"],
			animate : function(a) {
				var b = this;
				if (Ext.fx.Manager.hasFxBlock(b.id)) {
					return b
				}
				Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim", b.anim(a)));
				return this
			},
			anim : function(a) {
				if (!Ext.isObject(a)) {
					return (a) ? {} : false
				}
				var b = this;
				if (a.stopAnimation) {
					b.stopAnimation()
				}
				Ext.applyIf(a, Ext.fx.Manager.getFxDefaults(b.id));
				return Ext.apply({
							target : b,
							paused : true
						}, a)
			},
			stopFx : Ext.Function.alias(Ext.util.Animate, "stopAnimation"),
			stopAnimation : function() {
				Ext.fx.Manager.stopAnimation(this.id)
			},
			syncFx : function() {
				Ext.fx.Manager.setFxDefaults(this.id, {
							concurrent : true
						})
			},
			sequenceFx : function() {
				Ext.fx.Manager.setFxDefaults(this.id, {
							concurrent : false
						})
			},
			hasActiveFx : Ext.Function.alias(Ext.util.Animate,
					"getActiveAnimation"),
			getActiveAnimation : function() {
				return Ext.fx.Manager.getActiveAnimation(this.id)
			}
		});
Ext.applyIf(Ext.core.Element.prototype, Ext.util.Animate.prototype);
Ext.define("Ext.util.Filter", {
	anyMatch : false,
	exactMatch : false,
	caseSensitive : false,
	constructor : function(a) {
		Ext.apply(this, a);
		this.filter = this.filter || this.filterFn;
		if (this.filter == undefined) {
			if (this.property == undefined || this.value == undefined) {
			} else {
				this.filter = this.createFilterFn()
			}
			this.filterFn = this.filter
		}
	},
	createFilterFn : function() {
		var a = this, c = a.createValueMatcher(), b = a.property;
		return function(d) {
			return c.test(a.getRoot.call(a, d)[b])
		}
	},
	getRoot : function(a) {
		return this.root == undefined ? a : a[this.root]
	},
	createValueMatcher : function() {
		var d = this, e = d.value, f = d.anyMatch, c = d.exactMatch, a = d.caseSensitive, b = Ext.String.escapeRegex;
		if (!e.exec) {
			e = String(e);
			if (f === true) {
				e = b(e)
			} else {
				e = "^" + b(e);
				if (c === true) {
					e += "$"
				}
			}
			e = new RegExp(e, a ? "" : "i")
		}
		return e
	}
});
Ext.define("Ext.ZIndexManager", {
			alternateClassName : "Ext.WindowGroup",
			statics : {
				zBase : 9000
			},
			constructor : function(a) {
				var b = this;
				b.list = {};
				b.zIndexStack = [];
				b.front = null;
				if (a) {
					if (a.isContainer) {
						a.on("resize", b._onContainerResize, b);
						b.zseed = Ext.Number.from(a.getEl().getStyle("zIndex"),
								b.getNextZSeed());
						b.targetEl = a.getTargetEl();
						b.container = a
					} else {
						Ext.EventManager
								.onWindowResize(b._onContainerResize, b);
						b.zseed = b.getNextZSeed();
						b.targetEl = Ext.get(a)
					}
				} else {
					Ext.EventManager.onWindowResize(b._onContainerResize, b);
					b.zseed = b.getNextZSeed();
					Ext.onDocumentReady(function() {
								b.targetEl = Ext.getBody()
							})
				}
			},
			getNextZSeed : function() {
				return (Ext.ZIndexManager.zBase += 10000)
			},
			setBase : function(a) {
				this.zseed = a;
				return this.assignZIndices()
			},
			assignZIndices : function() {
				var c = this.zIndexStack, b = c.length, e = 0, f = this.zseed, d;
				for (; e < b; e++) {
					d = c[e];
					if (d && !d.hidden) {
						f = d.setZIndex(f)
					}
				}
				this._activateLast();
				return f
			},
			_setActiveChild : function(a) {
				if (a != this.front) {
					if (this.front) {
						this.front.setActive(false, a)
					}
					this.front = a;
					if (a) {
						a.setActive(true);
						if (a.modal) {
							this._showModalMask(a.el.getStyle("zIndex") - 4)
						}
					}
				}
			},
			_activateLast : function(a) {
				var b, d = false, c;
				for (c = this.zIndexStack.length - 1; c >= 0; --c) {
					b = this.zIndexStack[c];
					if (!b.hidden) {
						if (!d) {
							this._setActiveChild(b);
							d = true
						}
						if (b.modal) {
							this._showModalMask(b.el.getStyle("zIndex") - 4);
							return
						}
					}
				}
				this._hideModalMask();
				if (!d) {
					this._setActiveChild(null)
				}
			},
			_showModalMask : function(a) {
				if (!this.mask) {
					this.mask = this.targetEl.createChild({
								cls : Ext.baseCSSPrefix + "mask"
							});
					this.mask.setVisibilityMode(Ext.core.Element.DISPLAY);
					this.mask.on("click", this._onMaskClick, this)
				}
				Ext.getBody().addCls(Ext.baseCSSPrefix + "body-masked");
				this.mask.setSize(this.targetEl.getViewSize(true));
				this.mask.setStyle("zIndex", a);
				this.mask.show()
			},
			_hideModalMask : function() {
				if (this.mask) {
					Ext.getBody().removeCls(Ext.baseCSSPrefix + "body-masked");
					this.mask.hide()
				}
			},
			_onMaskClick : function() {
				if (this.front) {
					this.front.focus()
				}
			},
			_onContainerResize : function() {
				if (this.mask && this.mask.isVisible()) {
					this.mask.setSize(this.targetEl.getViewSize(true))
				}
			},
			register : function(a) {
				if (a.zIndexManager) {
					a.zIndexManager.unregister(a)
				}
				a.zIndexManager = this;
				this.list[a.id] = a;
				this.zIndexStack.push(a);
				a.on("hide", this._activateLast, this)
			},
			unregister : function(a) {
				delete a.zIndexManager;
				if (this.list && this.list[a.id]) {
					delete this.list[a.id];
					a.un("hide", this._activateLast);
					Ext.Array.remove(this.zIndexStack, a);
					this._activateLast(a)
				}
			},
			get : function(a) {
				return typeof a == "object" ? a : this.list[a]
			},
			bringToFront : function(a) {
				a = this.get(a);
				if (a != this.front) {
					Ext.Array.remove(this.zIndexStack, a);
					this.zIndexStack.push(a);
					this.assignZIndices();
					return true
				}
				if (a.modal) {
					Ext.getBody().addCls(Ext.baseCSSPrefix + "body-masked");
					this.mask.setSize(Ext.core.Element.getViewWidth(true),
							Ext.core.Element.getViewHeight(true));
					this.mask.show()
				}
				return false
			},
			sendToBack : function(a) {
				a = this.get(a);
				Ext.Array.remove(this.zIndexStack, a);
				this.zIndexStack.unshift(a);
				this.assignZIndices();
				return a
			},
			hideAll : function() {
				for (var a in this.list) {
					if (this.list[a].isComponent && this.list[a].isVisible()) {
						this.list[a].hide()
					}
				}
			},
			hide : function() {
				var b = 0, c = this.zIndexStack.length, a;
				this.tempHidden = [];
				for (; b < c; b++) {
					a = this.zIndexStack[b];
					if (a.isVisible()) {
						this.tempHidden.push(a);
						a.hide()
					}
				}
			},
			show : function() {
				var c = 0, d = this.tempHidden.length, b, a, e;
				for (; c < d; c++) {
					b = this.tempHidden[c];
					a = b.x;
					e = b.y;
					b.show();
					b.setPosition(a, e)
				}
				delete this.tempHidden
			},
			getActive : function() {
				return this.front
			},
			getBy : function(e, d) {
				var f = [], c = 0, a = this.zIndexStack.length, b;
				for (; c < a; c++) {
					b = this.zIndexStack[c];
					if (e.call(d || b, b) !== false) {
						f.push(b)
					}
				}
				return f
			},
			each : function(c, b) {
				var a;
				for (var d in this.list) {
					a = this.list[d];
					if (a.isComponent && c.call(b || a, a) === false) {
						return
					}
				}
			},
			eachBottomUp : function(e, d) {
				var b, a = this.zIndexStack, c, f;
				for (c = 0, f = a.length; c < f; c++) {
					b = a[c];
					if (b.isComponent && e.call(d || b, b) === false) {
						return
					}
				}
			},
			eachTopDown : function(e, d) {
				var b, a = this.zIndexStack, c;
				for (c = a.length; c-- > 0;) {
					b = a[c];
					if (b.isComponent && e.call(d || b, b) === false) {
						return
					}
				}
			},
			destroy : function() {
				delete this.zIndexStack;
				delete this.list;
				delete this.container;
				delete this.targetEl
			}
		}, function() {
			Ext.WindowManager = Ext.WindowMgr = new this()
		});
Ext.define("Ext.panel.Proxy", {
			alternateClassName : "Ext.dd.PanelProxy",
			constructor : function(a, b) {
				this.panel = a;
				this.id = this.panel.id + "-ddproxy";
				Ext.apply(this, b)
			},
			insertProxy : true,
			setStatus : Ext.emptyFn,
			reset : Ext.emptyFn,
			update : Ext.emptyFn,
			stop : Ext.emptyFn,
			sync : Ext.emptyFn,
			getEl : function() {
				return this.ghost.el
			},
			getGhost : function() {
				return this.ghost
			},
			getProxy : function() {
				return this.proxy
			},
			hide : function() {
				if (this.ghost) {
					if (this.proxy) {
						this.proxy.remove();
						delete this.proxy
					}
					this.panel.unghost(null, false);
					delete this.ghost
				}
			},
			show : function() {
				if (!this.ghost) {
					var a = this.panel.getSize();
					this.panel.el.setVisibilityMode(Ext.core.Element.DISPLAY);
					this.ghost = this.panel.ghost();
					if (this.insertProxy) {
						this.proxy = this.panel.el.insertSibling({
									cls : Ext.baseCSSPrefix + "panel-dd-spacer"
								});
						this.proxy.setSize(a)
					}
				}
			},
			repair : function(b, c, a) {
				this.hide();
				if (typeof c == "function") {
					c.call(a || this)
				}
			},
			moveProxy : function(a, b) {
				if (this.proxy) {
					a.insertBefore(this.proxy.dom, b)
				}
			}
		});
Ext.define("Ext.PluginManager", {
			extend : "Ext.AbstractManager",
			alternateClassName : "Ext.PluginMgr",
			singleton : true,
			typeName : "ptype",
			create : function(a, b) {
				if (a.init) {
					return a
				} else {
					return Ext.createByAlias("plugin." + (a.ptype || b), a)
				}
			},
			findByType : function(c, f) {
				var e = [], b = this.types;
				for (var a in b) {
					if (!b.hasOwnProperty(a)) {
						continue
					}
					var d = b[a];
					if (d.type == c && (!f || (f === true && d.isDefault))) {
						e.push(d)
					}
				}
				return e
			}
		}, function() {
			Ext.preg = function() {
				return Ext.PluginManager.registerType.apply(Ext.PluginManager,
						arguments)
			}
		});
Ext.define("Ext.layout.Layout", {
			isLayout : true,
			initialized : false,
			statics : {
				create : function(b, c) {
					var a;
					if (b instanceof Ext.layout.Layout) {
						return Ext.createByAlias("layout." + b)
					} else {
						if (Ext.isObject(b)) {
							a = b.type
						} else {
							a = b || c;
							b = {}
						}
						return Ext.createByAlias("layout." + a, b || {})
					}
				}
			},
			constructor : function(a) {
				this.id = Ext.id(null, this.type + "-");
				Ext.apply(this, a)
			},
			layout : function() {
				var a = this;
				a.layoutBusy = true;
				a.initLayout();
				if (a.beforeLayout.apply(a, arguments) !== false) {
					a.layoutCancelled = false;
					a.onLayout.apply(a, arguments);
					a.childrenChanged = false;
					a.owner.needsLayout = false;
					a.layoutBusy = false;
					a.afterLayout.apply(a, arguments)
				} else {
					a.layoutCancelled = true
				}
				a.layoutBusy = false;
				a.doOwnerCtLayouts()
			},
			beforeLayout : function() {
				this.renderItems(this.getLayoutItems(), this.getRenderTarget());
				return true
			},
			renderItems : function(a, e) {
				var d = a.length, b = 0, c;
				for (; b < d; b++) {
					c = a[b];
					if (c && !c.rendered) {
						this.renderItem(c, e, b)
					} else {
						if (!this.isValidParent(c, e, b)) {
							this.moveItem(c, e, b)
						}
					}
				}
			},
			isValidParent : function(b, c, a) {
				var d = b.el ? b.el.dom : Ext.getDom(b);
				if (d && c && c.dom) {
					if (Ext.isNumber(a) && d !== c.dom.childNodes[a]) {
						return false
					}
					return (d.parentNode == (c.dom || c))
				}
				return false
			},
			renderItem : function(b, c, a) {
				if (!b.rendered) {
					b.render(c, a);
					this.configureItem(b);
					this.childrenChanged = true
				}
			},
			moveItem : function(b, c, a) {
				c = c.dom || c;
				if (typeof a == "number") {
					a = c.childNodes[a]
				}
				c.insertBefore(b.el.dom, a || null);
				b.container = Ext.get(c);
				this.configureItem(b);
				this.childrenChanged = true
			},
			initLayout : function() {
				if (!this.initialized && !Ext.isEmpty(this.targetCls)) {
					this.getTarget().addCls(this.targetCls)
				}
				this.initialized = true
			},
			setOwner : function(a) {
				this.owner = a
			},
			getLayoutItems : function() {
				return []
			},
			configureItem : function(d) {
				var c = this, b = d.el, a = c.owner;
				if (c.itemCls) {
					b.addCls(c.itemCls)
				}
				if (a.itemCls) {
					b.addCls(a.itemCls)
				}
			},
			onLayout : Ext.emptyFn,
			afterLayout : Ext.emptyFn,
			onRemove : Ext.emptyFn,
			onDestroy : Ext.emptyFn,
			doOwnerCtLayouts : Ext.emptyFn,
			afterRemove : function(d) {
				var c = this, b = d.el, a = c.owner;
				if (d.rendered) {
					if (c.itemCls) {
						b.removeCls(c.itemCls)
					}
					if (a.itemCls) {
						b.removeCls(a.itemCls)
					}
				}
			},
			destroy : function() {
				if (!Ext.isEmpty(this.targetCls)) {
					var a = this.getTarget();
					if (a) {
						a.removeCls(this.targetCls)
					}
				}
				this.onDestroy()
			}
		});
Ext.define("Ext.data.Connection", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	statics : {
		requestId : 0
	},
	url : null,
	async : true,
	method : null,
	username : "",
	password : "",
	disableCaching : true,
	disableCachingParam : "_dc",
	timeout : 30000,
	useDefaultHeader : true,
	defaultPostHeader : "application/x-www-form-urlencoded; charset=UTF-8",
	useDefaultXhrHeader : true,
	defaultXhrHeader : "XMLHttpRequest",
	constructor : function(a) {
		a = a || {};
		Ext.apply(this, a);
		this.addEvents("beforerequest", "requestcomplete", "requestexception");
		this.requests = {};
		this.mixins.observable.constructor.call(this)
	},
	request : function(j) {
		j = j || {};
		var f = this, i = j.scope || window, e = j.username || f.username, g = j.password
				|| f.password || "", b, c, d, a, h;
		if (f.fireEvent("beforerequest", f, j) !== false) {
			c = f.setOptions(j, i);
			if (this.isFormUpload(j) === true) {
				this.upload(j.form, c.url, c.data, j);
				return null
			}
			if (j.autoAbort === true || f.autoAbort) {
				f.abort()
			}
			h = this.getXhrInstance();
			b = j.async !== false ? (j.async || f.async) : false;
			if (e) {
				h.open(c.method, c.url, b, e, g)
			} else {
				h.open(c.method, c.url, b)
			}
			a = f.setupHeaders(h, j, c.data, c.params);
			d = {
				id : ++Ext.data.Connection.requestId,
				xhr : h,
				headers : a,
				options : j,
				async : b,
				timeout : setTimeout(function() {
							d.timedout = true;
							f.abort(d)
						}, j.timeout || f.timeout)
			};
			f.requests[d.id] = d;
			if (b) {
				h.onreadystatechange = Ext.Function.bind(f.onStateChange, f,
						[d])
			}
			h.send(c.data);
			if (!b) {
				return this.onComplete(d)
			}
			return d
		} else {
			Ext.callback(j.callback, j.scope, [j, undefined, undefined]);
			return null
		}
	},
	upload : function(d, b, h, j) {
		d = Ext.getDom(d);
		j = j || {};
		var c = Ext.id(), f = document.createElement("iframe"), i = [], g = "multipart/form-data", e = {
			target : d.target,
			method : d.method,
			encoding : d.encoding,
			enctype : d.enctype,
			action : d.action
		}, a;
		Ext.fly(f).set({
					id : c,
					name : c,
					cls : Ext.baseCSSPrefix + "hide-display",
					src : Ext.SSL_SECURE_URL
				});
		document.body.appendChild(f);
		if (document.frames) {
			document.frames[c].name = c
		}
		Ext.fly(d).set({
					target : c,
					method : "POST",
					enctype : g,
					encoding : g,
					action : b || e.action
				});
		if (h) {
			Ext.iterate(Ext.Object.fromQueryString(h), function(k, l) {
						a = document.createElement("input");
						Ext.fly(a).set({
									type : "hidden",
									value : l,
									name : k
								});
						d.appendChild(a);
						i.push(a)
					})
		}
		Ext.fly(f).on("load",
				Ext.Function.bind(this.onUploadComplete, this, [f, j]), null, {
					single : true
				});
		d.submit();
		Ext.fly(d).set(e);
		Ext.each(i, function(k) {
					Ext.removeNode(k)
				})
	},
	onUploadComplete : function(h, b) {
		var c = this, a = {
			responseText : "",
			responseXML : null
		}, g, f;
		try {
			g = h.contentWindow.document || h.contentDocument
					|| window.frames[id].document;
			if (g) {
				if (g.body) {
					if (/textarea/i.test((f = g.body.firstChild || {}).tagName)) {
						a.responseText = f.value
					} else {
						a.responseText = g.body.innerHTML
					}
				}
				a.responseXML = g.XMLDocument || g
			}
		} catch (d) {
		}
		c.fireEvent("requestcomplete", c, a, b);
		Ext.callback(b.success, b.scope, [a, b]);
		Ext.callback(b.callback, b.scope, [b, true, a]);
		setTimeout(function() {
					Ext.removeNode(h)
				}, 100)
	},
	isFormUpload : function(a) {
		var b = this.getForm(a);
		if (b) {
			return (a.isUpload || (/multipart\/form-data/i).test(b
					.getAttribute("enctype")))
		}
		return false
	},
	getForm : function(a) {
		return Ext.getDom(a.form) || null
	},
	setOptions : function(k, j) {
		var h = this, e = k.params || {}, g = h.extraParams, d = k.urlParams, c = k.url
				|| h.url, i = k.jsonData, b, a, f;
		if (Ext.isFunction(e)) {
			e = e.call(j, k)
		}
		if (Ext.isFunction(c)) {
			c = c.call(j, k)
		}
		c = this.setupUrl(k, c);
		f = k.rawData || k.xmlData || i || null;
		if (i && !Ext.isPrimitive(i)) {
			f = Ext.encode(f)
		}
		if (Ext.isObject(e)) {
			e = Ext.Object.toQueryString(e)
		}
		if (Ext.isObject(g)) {
			g = Ext.Object.toQueryString(g)
		}
		e = e + ((g) ? ((e) ? "&" : "") + g : "");
		d = Ext.isObject(d) ? Ext.Object.toQueryString(d) : d;
		e = this.setupParams(k, e);
		b = (k.method || h.method || ((e || f) ? "POST" : "GET")).toUpperCase();
		this.setupMethod(k, b);
		a = k.disableCaching !== false
				? (k.disableCaching || h.disableCaching)
				: false;
		if (b === "GET" && a) {
			c = Ext.urlAppend(c,
					(k.disableCachingParam || h.disableCachingParam) + "="
							+ (new Date().getTime()))
		}
		if ((b == "GET" || f) && e) {
			c = Ext.urlAppend(c, e);
			e = null
		}
		if (d) {
			c = Ext.urlAppend(c, d)
		}
		return {
			url : c,
			method : b,
			data : f || e || null
		}
	},
	setupUrl : function(b, a) {
		var c = this.getForm(b);
		if (c) {
			a = a || c.action
		}
		return a
	},
	setupParams : function(a, d) {
		var c = this.getForm(a), b;
		if (c && !this.isFormUpload(a)) {
			b = Ext.core.Element.serializeForm(c);
			d = d ? (d + "&" + b) : b
		}
		return d
	},
	setupMethod : function(a, b) {
		if (this.isFormUpload(a)) {
			return "POST"
		}
		return b
	},
	setupHeaders : function(l, m, d, c) {
		var h = this, b = Ext
				.apply({}, m.headers || {}, h.defaultHeaders || {}), k = h.defaultPostHeader, i = m.jsonData, a = m.xmlData, j, f;
		if (!b["Content-Type"] && (d || c)) {
			if (d) {
				if (m.rawData) {
					k = "text/plain"
				} else {
					if (a && Ext.isDefined(a)) {
						k = "text/xml"
					} else {
						if (i && Ext.isDefined(i)) {
							k = "application/json"
						}
					}
				}
			}
			b["Content-Type"] = k
		}
		if (h.useDefaultXhrHeader && !b["X-Requested-With"]) {
			b["X-Requested-With"] = h.defaultXhrHeader
		}
		try {
			for (j in b) {
				if (b.hasOwnProperty(j)) {
					f = b[j];
					l.setRequestHeader(j, f)
				}
			}
		} catch (g) {
			h.fireEvent("exception", j, f)
		}
		return b
	},
	getXhrInstance : (function() {
		var b = [function() {
					return new XMLHttpRequest()
				}, function() {
					return new ActiveXObject("MSXML2.XMLHTTP.3.0")
				}, function() {
					return new ActiveXObject("MSXML2.XMLHTTP")
				}, function() {
					return new ActiveXObject("Microsoft.XMLHTTP")
				}], c = 0, a = b.length, f;
		for (; c < a; ++c) {
			try {
				f = b[c];
				f();
				break
			} catch (d) {
			}
		}
		return f
	})(),
	isLoading : function(a) {
		if (!(a && a.xhr)) {
			return false
		}
		var b = a.xhr.readyState;
		return !(b === 0 || b == 4)
	},
	abort : function(b) {
		var a = this, d = a.requests, c;
		if (b && a.isLoading(b)) {
			b.xhr.onreadystatechange = null;
			b.xhr.abort();
			a.clearTimeout(b);
			if (!b.timedout) {
				b.aborted = true
			}
			a.onComplete(b);
			a.cleanup(b)
		} else {
			if (!b) {
				for (c in d) {
					if (d.hasOwnProperty(c)) {
						a.abort(d[c])
					}
				}
			}
		}
	},
	onStateChange : function(a) {
		if (a.xhr.readyState == 4) {
			this.clearTimeout(a);
			this.onComplete(a);
			this.cleanup(a)
		}
	},
	clearTimeout : function(a) {
		clearTimeout(a.timeout);
		delete a.timeout
	},
	cleanup : function(a) {
		a.xhr = null;
		delete a.xhr
	},
	onComplete : function(e) {
		var d = this, c = e.options, a = d.parseStatus(e.xhr.status), f = a.success, b;
		if (f) {
			b = d.createResponse(e);
			d.fireEvent("requestcomplete", d, b, c);
			Ext.callback(c.success, c.scope, [b, c])
		} else {
			if (a.isException || e.aborted || e.timedout) {
				b = d.createException(e)
			} else {
				b = d.createResponse(e)
			}
			d.fireEvent("requestexception", d, b, c);
			Ext.callback(c.failure, c.scope, [b, c])
		}
		Ext.callback(c.callback, c.scope, [c, f, b]);
		delete d.requests[e.id];
		return b
	},
	parseStatus : function(a) {
		a = a == 1223 ? 204 : a;
		var c = (a >= 200 && a < 300) || a == 304, b = false;
		if (!c) {
			switch (a) {
				case 12002 :
				case 12029 :
				case 12030 :
				case 12031 :
				case 12152 :
				case 13030 :
					b = true;
					break
			}
		}
		return {
			success : c,
			isException : b
		}
	},
	createResponse : function(c) {
		var h = c.xhr, a = {}, i = h.getAllResponseHeaders().replace(/\r\n/g,
				"\n").split("\n"), d = i.length, j, e, g, f, b;
		while (d--) {
			j = i[d];
			e = j.indexOf(":");
			if (e >= 0) {
				g = j.substr(0, e).toLowerCase();
				if (j.charAt(e + 1) == " ") {
					++e
				}
				a[g] = j.substr(e + 1)
			}
		}
		c.xhr = null;
		delete c.xhr;
		b = {
			request : c,
			requestId : c.id,
			status : h.status,
			statusText : h.statusText,
			getResponseHeader : function(k) {
				return a[k.toLowerCase()]
			},
			getAllResponseHeaders : function() {
				return a
			},
			responseText : h.responseText,
			responseXML : h.responseXML
		};
		h = null;
		return b
	},
	createException : function(a) {
		return {
			request : a,
			requestId : a.id,
			status : a.aborted ? -1 : 0,
			statusText : a.aborted
					? "transaction aborted"
					: "communication failure",
			aborted : a.aborted,
			timedout : a.timedout
		}
	}
});
Ext.define("Ext.util.Sorter", {
			direction : "ASC",
			constructor : function(a) {
				var b = this;
				Ext.apply(b, a);
				b.updateSortFunction()
			},
			createSortFunction : function(b) {
				var c = this, d = c.property, e = c.direction || "ASC", a = e
						.toUpperCase() == "DESC" ? -1 : 1;
				return function(g, f) {
					return a * b.call(c, g, f)
				}
			},
			defaultSorterFn : function(d, c) {
				var b = this, a = b.transform, f = b.getRoot(d)[b.property], e = b
						.getRoot(c)[b.property];
				if (a) {
					f = a(f);
					e = a(e)
				}
				return f > e ? 1 : (f < e ? -1 : 0)
			},
			getRoot : function(a) {
				return this.root == undefined ? a : a[this.root]
			},
			setDirection : function(b) {
				var a = this;
				a.direction = b;
				a.updateSortFunction()
			},
			toggle : function() {
				var a = this;
				a.direction = Ext.String.toggle(a.direction, "ASC", "DESC");
				a.updateSortFunction()
			},
			updateSortFunction : function() {
				var a = this;
				a.sort = a.createSortFunction(a.sorterFn || a.defaultSorterFn)
			}
		});
Ext.define("Ext.fx.Queue", {
			requires : ["Ext.util.HashMap"],
			constructor : function() {
				this.targets = Ext.create("Ext.util.HashMap");
				this.fxQueue = {}
			},
			getFxDefaults : function(a) {
				var b = this.targets.get(a);
				if (b) {
					return b.fxDefaults
				}
				return {}
			},
			setFxDefaults : function(a, c) {
				var b = this.targets.get(a);
				if (b) {
					b.fxDefaults = Ext.apply(b.fxDefaults || {}, c)
				}
			},
			stopAnimation : function(b) {
				var d = this, a = d.getFxQueue(b), c = a.length;
				while (c) {
					a[c - 1].end();
					c--
				}
			},
			getActiveAnimation : function(b) {
				var a = this.getFxQueue(b);
				return (a && !!a.length) ? a[0] : false
			},
			hasFxBlock : function(b) {
				var a = this.getFxQueue(b);
				return a && a[0] && a[0].block
			},
			getFxQueue : function(b) {
				if (!b) {
					return false
				}
				var c = this, a = c.fxQueue[b], d = c.targets.get(b);
				if (!d) {
					return false
				}
				if (!a) {
					c.fxQueue[b] = [];
					if (d.type != "element") {
						d.target.on("destroy", function() {
									c.fxQueue[b] = []
								})
					}
				}
				return c.fxQueue[b]
			},
			queueFx : function(d) {
				var c = this, e = d.target, a, b;
				if (!e) {
					return
				}
				a = c.getFxQueue(e.getId());
				b = a.length;
				if (b) {
					if (d.concurrent) {
						d.paused = false
					} else {
						a[b - 1].on("afteranimate", function() {
									d.paused = false
								})
					}
				} else {
					d.paused = false
				}
				d.on("afteranimate", function() {
							Ext.Array.remove(a, d);
							if (d.remove) {
								if (e.type == "element") {
									var f = Ext.get(e.id);
									if (f) {
										f.remove()
									}
								}
							}
						}, this);
				a.push(d)
			}
		});
Ext.define("Ext.dd.StatusProxy", {
			animRepair : false,
			constructor : function(a) {
				Ext.apply(this, a);
				this.id = this.id || Ext.id();
				this.proxy = Ext.createWidget("component", {
							floating : true,
							id : this.id,
							html : '<div class="' + Ext.baseCSSPrefix
									+ 'dd-drop-icon"></div><div class="'
									+ Ext.baseCSSPrefix
									+ 'dd-drag-ghost"></div>',
							cls : Ext.baseCSSPrefix + "dd-drag-proxy "
									+ this.dropNotAllowed,
							shadow : !a || a.shadow !== false,
							renderTo : document.body
						});
				this.el = this.proxy.el;
				this.el.show();
				this.el.setVisibilityMode(Ext.core.Element.VISIBILITY);
				this.el.hide();
				this.ghost = Ext.get(this.el.dom.childNodes[1]);
				this.dropStatus = this.dropNotAllowed
			},
			dropAllowed : Ext.baseCSSPrefix + "dd-drop-ok",
			dropNotAllowed : Ext.baseCSSPrefix + "dd-drop-nodrop",
			setStatus : function(a) {
				a = a || this.dropNotAllowed;
				if (this.dropStatus != a) {
					this.el.replaceCls(this.dropStatus, a);
					this.dropStatus = a
				}
			},
			reset : function(a) {
				this.el.dom.className = Ext.baseCSSPrefix + "dd-drag-proxy "
						+ this.dropNotAllowed;
				this.dropStatus = this.dropNotAllowed;
				if (a) {
					this.ghost.update("")
				}
			},
			update : function(a) {
				if (typeof a == "string") {
					this.ghost.update(a)
				} else {
					this.ghost.update("");
					a.style.margin = "0";
					this.ghost.dom.appendChild(a)
				}
				var b = this.ghost.dom.firstChild;
				if (b) {
					Ext.fly(b).setStyle("float", "none")
				}
			},
			getEl : function() {
				return this.el
			},
			getGhost : function() {
				return this.ghost
			},
			hide : function(a) {
				this.proxy.hide();
				if (a) {
					this.reset(true)
				}
			},
			stop : function() {
				if (this.anim && this.anim.isAnimated && this.anim.isAnimated()) {
					this.anim.stop()
				}
			},
			show : function() {
				this.proxy.show();
				this.proxy.toFront()
			},
			sync : function() {
				this.proxy.el.sync()
			},
			repair : function(b, c, a) {
				this.callback = c;
				this.scope = a;
				if (b && this.animRepair !== false) {
					this.el.addCls(Ext.baseCSSPrefix + "dd-drag-repair");
					this.el.hideUnders(true);
					this.anim = this.el.animate({
								duration : this.repairDuration || 500,
								easing : "ease-out",
								to : {
									x : b[0],
									y : b[1]
								},
								stopAnimation : true,
								callback : this.afterRepair,
								scope : this
							})
				} else {
					this.afterRepair()
				}
			},
			afterRepair : function() {
				this.hide(true);
				if (typeof this.callback == "function") {
					this.callback.call(this.scope || this)
				}
				this.callback = null;
				this.scope = null
			},
			destroy : function() {
				Ext.destroy(this.ghost, this.proxy, this.el)
			}
		});
Ext.define("Ext.ElementLoader", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			uses : ["Ext.data.Connection", "Ext.Ajax"],
			statics : {
				Renderer : {
					Html : function(a, b, c) {
						a.getTarget()
								.update(b.responseText, c.scripts === true);
						return true
					}
				}
			},
			url : null,
			params : null,
			baseParams : null,
			autoLoad : false,
			target : null,
			loadMask : false,
			ajaxOptions : null,
			scripts : false,
			isLoader : true,
			constructor : function(b) {
				var c = this, a;
				b = b || {};
				Ext.apply(c, b);
				c.setTarget(c.target);
				c.addEvents("beforeload", "exception", "load");
				c.mixins.observable.constructor.call(c);
				if (c.autoLoad) {
					a = c.autoLoad;
					if (a === true) {
						a = {}
					}
					c.load(a)
				}
			},
			setTarget : function(b) {
				var a = this;
				b = Ext.get(b);
				if (a.target && a.target != b) {
					a.abort()
				}
				a.target = b
			},
			getTarget : function() {
				return this.target || null
			},
			abort : function() {
				var a = this.active;
				if (a !== undefined) {
					Ext.Ajax.abort(a.request);
					if (a.mask) {
						this.removeMask()
					}
					delete this.active
				}
			},
			removeMask : function() {
				this.target.unmask()
			},
			addMask : function(a) {
				this.target.mask(a === true ? null : a)
			},
			load : function(h) {
				h = Ext.apply({}, h);
				var e = this, d = e.target, i = Ext.isDefined(h.loadMask)
						? h.loadMask
						: e.loadMask, b = Ext.apply({}, h.params), a = Ext
						.apply({}, h.ajaxOptions), f = h.callback || e.callback, g = h.scope
						|| e.scope || e, c;
				Ext.applyIf(a, e.ajaxOptions);
				Ext.applyIf(h, a);
				Ext.applyIf(b, e.params);
				Ext.apply(b, e.baseParams);
				Ext.applyIf(h, {
							url : e.url
						});
				Ext.apply(h, {
							scope : e,
							params : b,
							callback : e.onComplete
						});
				if (e.fireEvent("beforeload", e, h) === false) {
					return
				}
				if (i) {
					e.addMask(i)
				}
				c = Ext.Ajax.request(h);
				e.active = {
					request : c,
					options : h,
					mask : i,
					scope : g,
					callback : f,
					success : h.success || e.success,
					failure : h.failure || e.failure,
					renderer : h.renderer || e.renderer,
					scripts : Ext.isDefined(h.scripts) ? h.scripts : e.scripts
				};
				e.setOptions(e.active, h)
			},
			setOptions : Ext.emptyFn,
			onComplete : function(b, g, a) {
				var d = this, f = d.active, c = f.scope, e = d
						.getRenderer(f.renderer);
				if (g) {
					g = e.call(d, d, a, f)
				}
				if (g) {
					Ext.callback(f.success, c, [d, a, b]);
					d.fireEvent("load", d, a, b)
				} else {
					Ext.callback(f.failure, c, [d, a, b]);
					d.fireEvent("exception", d, a, b)
				}
				Ext.callback(f.callback, c, [d, g, a, b]);
				if (f.mask) {
					d.removeMask()
				}
				delete d.active
			},
			getRenderer : function(a) {
				if (Ext.isFunction(a)) {
					return a
				}
				return this.statics().Renderer.Html
			},
			startAutoRefresh : function(a, b) {
				var c = this;
				c.stopAutoRefresh();
				c.autoRefresh = setInterval(function() {
							c.load(b)
						}, a)
			},
			stopAutoRefresh : function() {
				clearInterval(this.autoRefresh);
				delete this.autoRefresh
			},
			isAutoRefreshing : function() {
				return Ext.isDefined(this.autoRefresh)
			},
			destroy : function() {
				var a = this;
				a.stopAutoRefresh();
				delete a.target;
				a.abort();
				a.clearListeners()
			}
		});
Ext.define("Ext.fx.target.Target", {
			isAnimTarget : true,
			constructor : function(a) {
				this.target = a;
				this.id = this.getId()
			},
			getId : function() {
				return this.target.id
			}
		});
Ext.define("Ext.state.Provider", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	prefix : "ext-",
	constructor : function(a) {
		a = a || {};
		var b = this;
		Ext.apply(b, a);
		b.addEvents("statechange");
		b.state = {};
		b.mixins.observable.constructor.call(b)
	},
	get : function(b, a) {
		return typeof this.state[b] == "undefined" ? a : this.state[b]
	},
	clear : function(a) {
		var b = this;
		delete b.state[a];
		b.fireEvent("statechange", b, a, null)
	},
	set : function(a, c) {
		var b = this;
		b.state[a] = c;
		b.fireEvent("statechange", b, a, c)
	},
	decodeValue : function(f) {
		var d = this, c = /^(a|n|d|b|s|o|e)\:(.*)$/, e = c.exec(unescape(f)), b, a, f, g;
		if (!e || !e[1]) {
			return
		}
		a = e[1];
		f = e[2];
		switch (a) {
			case "e" :
				return null;
			case "n" :
				return parseFloat(f);
			case "d" :
				return new Date(Date.parse(f));
			case "b" :
				return (f == "1");
			case "a" :
				b = [];
				if (f != "") {
					Ext.each(f.split("^"), function(h) {
								b.push(d.decodeValue(h))
							}, d)
				}
				return b;
			case "o" :
				b = {};
				if (f != "") {
					Ext.each(f.split("^"), function(h) {
								g = h.split("=");
								b[g[0]] = d.decodeValue(g[1])
							}, d)
				}
				return b;
			default :
				return f
		}
	},
	encodeValue : function(e) {
		var f = "", d = 0, b, a, c;
		if (e == null) {
			return "e:1"
		} else {
			if (typeof e == "number") {
				b = "n:" + e
			} else {
				if (typeof e == "boolean") {
					b = "b:" + (e ? "1" : "0")
				} else {
					if (Ext.isDate(e)) {
						b = "d:" + e.toGMTString()
					} else {
						if (Ext.isArray(e)) {
							for (a = e.length; d < a; d++) {
								f += this.encodeValue(e[d]);
								if (d != a - 1) {
									f += "^"
								}
							}
							b = "a:" + f
						} else {
							if (typeof e == "object") {
								for (c in e) {
									if (typeof e[c] != "function"
											&& e[c] !== undefined) {
										f += c + "=" + this.encodeValue(e[c])
												+ "^"
									}
								}
								b = "o:" + f.substring(0, f.length - 1)
							} else {
								b = "s:" + e
							}
						}
					}
				}
			}
		}
		return escape(b)
	}
});
Ext.define("Ext.data.writer.Writer", {
	alias : "writer.base",
	alternateClassName : ["Ext.data.DataWriter", "Ext.data.Writer"],
	writeAllFields : true,
	nameProperty : "name",
	constructor : function(a) {
		Ext.apply(this, a)
	},
	write : function(e) {
		var c = e.operation, b = c.records || [], a = b.length, d = 0, f = [];
		for (; d < a; d++) {
			f.push(this.getRecordData(b[d]))
		}
		return this.writeRecords(e, f)
	},
	getRecordData : function(e) {
		var i = e.phantom === true, b = this.writeAllFields || i, c = this.nameProperty, f = e.fields, d = {}, h, a, g, j;
		if (b) {
			f.each(function(k) {
						if (k.persist) {
							a = k[c] || k.name;
							d[a] = e.get(k.name)
						}
					})
		} else {
			h = e.getChanges();
			for (j in h) {
				if (h.hasOwnProperty(j)) {
					g = f.get(j);
					a = g[c] || g.name;
					d[a] = h[j]
				}
			}
			if (!i) {
				d[e.idProperty] = e.getId()
			}
		}
		return d
	}
});
Ext.define("Ext.data.ResultSet", {
			loaded : true,
			count : 0,
			total : 0,
			success : false,
			constructor : function(a) {
				Ext.apply(this, a);
				this.totalRecords = this.total;
				if (a.count === undefined) {
					this.count = this.records.length
				}
			}
		});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.VideoWindow", {
	extend : "Ext.ux.desktop.Module",
	uses : ["Ext.ux.desktop.Video"],
	id : "video",
	windowId : "video-window",
	tipWidth : 160,
	tipHeight : 96,
	init : function() {
		this.launcher = {
			text : "About Ext JS",
			iconCls : "video",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var a = this, c = a.app.getDesktop(), b = c.getWindow(a.windowId);
		if (!b) {
			b = c.createWindow({
				id : a.windowId,
				title : "About Ext JS",
				width : 740,
				height : 480,
				iconCls : "video",
				animCollapse : false,
				border : false,
				layout : "fit",
				items : [{
					xtype : "video",
					id : "video-player",
					src : [{
								src : "http://dev.sencha.com/desktopvideo.mp4",
								type : "video/mp4"
							}, {
								src : "http://dev.sencha.com/desktopvideo.ogv",
								type : "video/ogg"
							}, {
								src : "http://dev.sencha.com/desktopvideo.mov",
								type : "video/quicktime"
							}],
					autobuffer : true,
					autoplay : true,
					controls : true,
					listeners : {
						afterrender : function(d) {
							a.videoEl = d.video.dom;
							if (d.supported) {
								a.tip = new Ext.tip.ToolTip({
											anchor : "bottom",
											dismissDelay : 0,
											height : a.tipHeight,
											width : a.tipWidth,
											renderTpl : ['<canvas width="',
													a.tipWidth, '" height="',
													a.tipHeight, '">'],
											renderSelectors : {
												body : "canvas"
											},
											listeners : {
												afterrender : a.onTooltipRender,
												show : a.renderPreview,
												scope : a
											}
										})
							}
						}
					}
				}],
				listeners : {
					beforedestroy : function() {
						a.tip = a.ctx = a.videoEl = null
					}
				}
			})
		}
		b.show();
		if (a.tip) {
			a.tip.setTarget(b.taskButton.el)
		}
		return b
	},
	onTooltipRender : function(c) {
		var a = c.body.dom, b = this;
		b.ctx = a.getContext && a.getContext("2d")
	},
	renderPreview : function() {
		var a = this;
		if ((a.tip && !a.tip.isVisible()) || !a.videoEl) {
			return
		}
		if (a.ctx) {
			try {
				a.ctx.drawImage(a.videoEl, 0, 0, a.tipWidth, a.tipHeight)
			} catch (b) {
			}
		}
		Ext.Function.defer(a.renderPreview, 20, a)
	}
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
var windowIndex = 0;
Ext.define("MyDesktop.BogusModule", {
			extend : "Ext.ux.desktop.Module",
			init : function() {
				this.launcher = {
					text : "Window " + (++windowIndex),
					iconCls : "bogus",
					handler : this.createWindow,
					scope : this,
					windowId : windowIndex
				}
			},
			createWindow : function(b) {
				var c = this.app.getDesktop();
				var a = c.getWindow("bogus" + b.windowId);
				if (!a) {
					a = c.createWindow({
								id : "bogus" + b.windowId,
								title : b.text,
								width : 640,
								height : 480,
								html : "<p>Something useful would be in here.</p>",
								iconCls : "bogus",
								animCollapse : false,
								constrainHeader : true
							})
				}
				a.show();
				return a
			}
		});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.BogusMenuModule", {
			extend : "MyDesktop.BogusModule",
			init : function() {
				this.launcher = {
					text : "More items",
					iconCls : "bogus",
					handler : function() {
						return false
					},
					menu : {
						items : []
					}
				};
				for (var a = 0; a < 5; ++a) {
					this.launcher.menu.items.push({
								text : "Window " + (++windowIndex),
								iconCls : "bogus",
								handler : this.createWindow,
								scope : this,
								windowId : windowIndex
							})
				}
			}
		});
Ext.define("Ext.chart.Label", {
	requires : ["Ext.draw.Color"],
	colorStringRe : /url\s*\(\s*#([^\/)]+)\s*\)/,
	constructor : function(a) {
		var b = this;
		b.label = Ext.applyIf(b.label || {}, {
					display : "none",
					color : "#000",
					field : "name",
					minMargin : 50,
					font : "11px Helvetica, sans-serif",
					orientation : "horizontal",
					renderer : function(c) {
						return c
					}
				});
		if (b.label.display !== "none") {
			b.labelsGroup = b.chart.surface.getGroup(b.seriesId + "-labels")
		}
	},
	renderLabels : function() {
		var F = this, q = F.chart, t = q.gradients, b, r = F.items, d = q.animate, D = F.label, w = D.display, v = D.color, c = []
				.concat(D.field), l = F.labelsGroup, e = F.chart.store, z = e
				.getCount(), g = r.length / z, y, f, x, u, a = (t || 0)
				&& t.length, p, B, n, C, h, o, s, m, A, E, H = Ext.draw.Color, G;
		if (w == "none") {
			return
		}
		for (y = 0, f = 0; y < z; y++) {
			for (x = 0; x < g; x++) {
				C = r[f];
				h = l.getAt(f);
				o = e.getAt(y);
				if (!C && h) {
					h.hide(true)
				}
				if (C && c[x]) {
					if (!h) {
						h = F.onCreateLabel(o, C, y, w, x, f)
					}
					F.onPlaceLabel(h, o, C, y, w, d, x, f);
					if (D.contrast && C.sprite) {
						s = C.sprite;
						G = s._to && s._to.fill || s.attr.fill;
						m = H.fromString(G);
						if (G && !m) {
							G = G.match(F.colorStringRe)[1];
							for (u = 0; u < a; u++) {
								b = t[u];
								if (b.id == G) {
									n = 0;
									p = 0;
									for (B in b.stops) {
										n++;
										p += H.fromString(b.stops[B].color)
												.getGrayscale()
									}
									A = (p / n) / 255;
									break
								}
							}
						} else {
							A = m.getGrayscale() / 255
						}
						E = H.fromString(h.attr.color || h.attr.fill).getHSL();
						E[2] = A > 0.5 ? 0.2 : 0.8;
						h.setAttributes({
									fill : String(H.fromHSL.apply({}, E))
								}, true)
					}
				}
				f++
			}
		}
		F.hideLabels(f)
	},
	hideLabels : function(c) {
		var b = this.labelsGroup, a;
		if (b) {
			a = b.getCount();
			while (a-- > c) {
				b.getAt(a).hide(true)
			}
		}
	}
});
Ext.define("Ext.chart.theme.Theme", {
			requires : ["Ext.draw.Color"],
			theme : "Base",
			themeAttrs : false,
			initTheme : function(e) {
				var d = this, b = Ext.chart.theme, c, a;
				if (e) {
					e = e.split(":");
					for (c in b) {
						if (c == e[0]) {
							a = e[1] == "gradients";
							d.themeAttrs = new b[c]({
										useGradients : a
									});
							if (a) {
								d.gradients = d.themeAttrs.gradients
							}
							if (d.themeAttrs.background) {
								d.background = d.themeAttrs.background
							}
							return
						}
					}
				}
			}
		}, function() {
			(function() {
				Ext.chart.theme = function(c, b) {
					c = c || {};
					var j = 0, g, a, h, o, p, e, m, n, k = [], d, f;
					if (c.baseColor) {
						d = Ext.draw.Color.fromString(c.baseColor);
						f = d.getHSL()[2];
						if (f < 0.15) {
							d = d.getLighter(0.3)
						} else {
							if (f < 0.3) {
								d = d.getLighter(0.15)
							} else {
								if (f > 0.85) {
									d = d.getDarker(0.3)
								} else {
									if (f > 0.7) {
										d = d.getDarker(0.15)
									}
								}
							}
						}
						c.colors = [d.getDarker(0.3).toString(),
								d.getDarker(0.15).toString(), d.toString(),
								d.getLighter(0.15).toString(),
								d.getLighter(0.3).toString()];
						delete c.baseColor
					}
					if (c.colors) {
						a = c.colors.slice();
						p = b.markerThemes;
						o = b.seriesThemes;
						g = a.length;
						b.colors = a;
						for (; j < g; j++) {
							h = a[j];
							m = p[j] || {};
							e = o[j] || {};
							m.fill = e.fill = m.stroke = e.stroke = h;
							p[j] = m;
							o[j] = e
						}
						b.markerThemes = p.slice(0, g);
						b.seriesThemes = o.slice(0, g)
					}
					for (n in b) {
						if (n in c) {
							if (Ext.isObject(c[n]) && Ext.isObject(b[n])) {
								Ext.apply(b[n], c[n])
							} else {
								b[n] = c[n]
							}
						}
					}
					if (c.useGradients) {
						a = b.colors || (function() {
							var i = [];
							for (j = 0, o = b.seriesThemes, g = o.length; j < g; j++) {
								i.push(o[j].fill || o[j].stroke)
							}
							return i
						})();
						for (j = 0, g = a.length; j < g; j++) {
							d = Ext.draw.Color.fromString(a[j]);
							if (d) {
								h = d.getDarker(0.1).toString();
								d = d.toString();
								n = "theme-" + d.substr(1) + "-" + h.substr(1);
								k.push({
											id : n,
											angle : 45,
											stops : {
												0 : {
													color : d.toString()
												},
												100 : {
													color : h.toString()
												}
											}
										});
								a[j] = "url(#" + n + ")"
							}
						}
						b.gradients = k;
						b.colors = a
					}
					Ext.apply(this, b)
				}
			})()
		});
Ext.define("Ext.chart.theme.Base", {
			requires : ["Ext.chart.theme.Theme"],
			constructor : function(a) {
				Ext.chart.theme.call(this, a, {
							background : false,
							axis : {
								stroke : "#444",
								"stroke-width" : 1
							},
							axisLabelTop : {
								fill : "#444",
								font : "12px Arial, Helvetica, sans-serif",
								spacing : 2,
								padding : 5,
								renderer : function(b) {
									return b
								}
							},
							axisLabelRight : {
								fill : "#444",
								font : "12px Arial, Helvetica, sans-serif",
								spacing : 2,
								padding : 5,
								renderer : function(b) {
									return b
								}
							},
							axisLabelBottom : {
								fill : "#444",
								font : "12px Arial, Helvetica, sans-serif",
								spacing : 2,
								padding : 5,
								renderer : function(b) {
									return b
								}
							},
							axisLabelLeft : {
								fill : "#444",
								font : "12px Arial, Helvetica, sans-serif",
								spacing : 2,
								padding : 5,
								renderer : function(b) {
									return b
								}
							},
							axisTitleTop : {
								font : "bold 18px Arial",
								fill : "#444"
							},
							axisTitleRight : {
								font : "bold 18px Arial",
								fill : "#444",
								rotate : {
									x : 0,
									y : 0,
									degrees : 270
								}
							},
							axisTitleBottom : {
								font : "bold 18px Arial",
								fill : "#444"
							},
							axisTitleLeft : {
								font : "bold 18px Arial",
								fill : "#444",
								rotate : {
									x : 0,
									y : 0,
									degrees : 270
								}
							},
							series : {
								"stroke-width" : 0
							},
							seriesLabel : {
								font : "12px Arial",
								fill : "#333"
							},
							marker : {
								stroke : "#555",
								fill : "#000",
								radius : 3,
								size : 3
							},
							colors : ["#94ae0a", "#115fa6", "#a61120",
									"#ff8809", "#ffd13e", "#a61187", "#24ad9a",
									"#7c7474", "#a66111"],
							seriesThemes : [{
										fill : "#115fa6"
									}, {
										fill : "#94ae0a"
									}, {
										fill : "#a61120"
									}, {
										fill : "#ff8809"
									}, {
										fill : "#ffd13e"
									}, {
										fill : "#a61187"
									}, {
										fill : "#24ad9a"
									}, {
										fill : "#7c7474"
									}, {
										fill : "#a66111"
									}],
							markerThemes : [{
										fill : "#115fa6",
										type : "circle"
									}, {
										fill : "#94ae0a",
										type : "cross"
									}, {
										fill : "#a61120",
										type : "plus"
									}]
						})
			}
		}, function() {
			var c = ["#b1da5a", "#4ce0e7", "#e84b67", "#da5abd", "#4d7fe6",
					"#fec935"], h = ["Green", "Sky", "Red", "Purple", "Blue",
					"Yellow"], g = 0, f = 0, b = c.length, a = Ext.chart.theme, d = [
					["#f0a50a", "#c20024", "#2044ba", "#810065", "#7eae29"],
					["#6d9824", "#87146e", "#2a9196", "#d39006", "#1e40ac"],
					["#fbbc29", "#ce2e4e", "#7e0062", "#158b90", "#57880e"],
					["#ef5773", "#fcbd2a", "#4f770d", "#1d3eaa", "#9b001f"],
					["#7eae29", "#fdbe2a", "#910019", "#27b4bc", "#d74dbc"],
					["#44dce1", "#0b2592", "#996e05", "#7fb325", "#b821a1"]], e = d.length;
			for (; g < b; g++) {
				a[h[g]] = (function(i) {
					return Ext.extend(a.Base, {
								constructor : function(j) {
									a.Base.prototype.constructor.call(this, Ext
													.apply({
																baseColor : i
															}, j))
								}
							})
				})(c[g])
			}
			for (g = 0; g < e; g++) {
				a["Category" + (g + 1)] = (function(i) {
					return Ext.extend(a.Base, {
								constructor : function(j) {
									a.Base.prototype.constructor.call(this, Ext
													.apply({
																colors : i
															}, j))
								}
							})
				})(d[g])
			}
		});
Ext.define("Ext.util.ComponentDragger", {
	extend : "Ext.dd.DragTracker",
	autoStart : 500,
	constructor : function(a, b) {
		this.comp = a;
		this.initialConstrainTo = b.constrainTo;
		this.callParent([b])
	},
	onStart : function(c) {
		var b = this, a = b.comp;
		this.startPosition = a.getPosition();
		if (a.ghost && !a.liveDrag) {
			b.proxy = a.ghost();
			b.dragTarget = b.proxy.header.el
		}
		if (b.constrain || b.constrainDelegate) {
			b.constrainTo = b.calculateConstrainRegion()
		}
	},
	calculateConstrainRegion : function() {
		var d = this, a = d.comp, g = d.initialConstrainTo, e, f, b = a.el.shadow
				? a.el.shadow.offset
				: 0;
		if (!(g instanceof Ext.util.Region)) {
			g = Ext.fly(g).getViewRegion()
		}
		if (b) {
			g.adjust(0, -b, -b, b)
		}
		if (!d.constrainDelegate) {
			e = Ext.fly(d.dragTarget).getRegion();
			f = d.proxy ? d.proxy.el.getRegion() : a.el.getRegion();
			g.adjust(e.top - f.top, e.right - f.right, e.bottom - f.bottom,
					e.left - f.left)
		}
		return g
	},
	onDrag : function(c) {
		var b = this, a = (b.proxy && !b.comp.liveDrag) ? b.proxy : b.comp, d = b
				.getOffset(b.constrain || b.constrainDelegate
						? "dragTarget"
						: null);
		a.setPosition.apply(a, [b.startPosition[0] + d[0],
						b.startPosition[1] + d[1]])
	},
	onEnd : function(a) {
		if (this.proxy && !this.comp.liveDrag) {
			this.comp.unghost()
		}
	}
});
Ext.define("Ext.util.Region", {
	requires : ["Ext.util.Offset"],
	statics : {
		getRegion : function(a) {
			return Ext.fly(a).getPageBox(true)
		},
		from : function(a) {
			return new this(a.top, a.right, a.bottom, a.left)
		}
	},
	constructor : function(d, f, a, c) {
		var e = this;
		e.y = e.top = e[1] = d;
		e.right = f;
		e.bottom = a;
		e.x = e.left = e[0] = c
	},
	contains : function(b) {
		var a = this;
		return (b.x >= a.x && b.right <= a.right && b.y >= a.y && b.bottom <= a.bottom)
	},
	intersect : function(g) {
		var f = this, d = Math.max(f.y, g.y), e = Math.min(f.right, g.right), a = Math
				.min(f.bottom, g.bottom), c = Math.max(f.x, g.x);
		if (a > d && e > c) {
			return new this.self(d, e, a, c)
		} else {
			return false
		}
	},
	union : function(g) {
		var f = this, d = Math.min(f.y, g.y), e = Math.max(f.right, g.right), a = Math
				.max(f.bottom, g.bottom), c = Math.min(f.x, g.x);
		return new this.self(d, e, a, c)
	},
	constrainTo : function(b) {
		var a = this, c = Ext.Number.constrain;
		a.top = a.y = c(a.top, b.y, b.bottom);
		a.bottom = c(a.bottom, b.y, b.bottom);
		a.left = a.x = c(a.left, b.x, b.right);
		a.right = c(a.right, b.x, b.right);
		return a
	},
	adjust : function(d, f, a, c) {
		var e = this;
		e.top = e.y += d;
		e.left = e.x += c;
		e.right += f;
		e.bottom += a;
		return e
	},
	getOutOfBoundOffset : function(a, b) {
		if (!Ext.isObject(a)) {
			if (a == "x") {
				return this.getOutOfBoundOffsetX(b)
			} else {
				return this.getOutOfBoundOffsetY(b)
			}
		} else {
			b = a;
			var c = Ext.create("Ext.util.Offset");
			c.x = this.getOutOfBoundOffsetX(b.x);
			c.y = this.getOutOfBoundOffsetY(b.y);
			return c
		}
	},
	getOutOfBoundOffsetX : function(a) {
		if (a <= this.x) {
			return this.x - a
		} else {
			if (a >= this.right) {
				return this.right - a
			}
		}
		return 0
	},
	getOutOfBoundOffsetY : function(a) {
		if (a <= this.y) {
			return this.y - a
		} else {
			if (a >= this.bottom) {
				return this.bottom - a
			}
		}
		return 0
	},
	isOutOfBound : function(a, b) {
		if (!Ext.isObject(a)) {
			if (a == "x") {
				return this.isOutOfBoundX(b)
			} else {
				return this.isOutOfBoundY(b)
			}
		} else {
			b = a;
			return (this.isOutOfBoundX(b.x) || this.isOutOfBoundY(b.y))
		}
	},
	isOutOfBoundX : function(a) {
		return (a < this.x || a > this.right)
	},
	isOutOfBoundY : function(a) {
		return (a < this.y || a > this.bottom)
	},
	restrict : function(b, d, a) {
		if (Ext.isObject(b)) {
			var c;
			a = d;
			d = b;
			if (d.copy) {
				c = d.copy()
			} else {
				c = {
					x : d.x,
					y : d.y
				}
			}
			c.x = this.restrictX(d.x, a);
			c.y = this.restrictY(d.y, a);
			return c
		} else {
			if (b == "x") {
				return this.restrictX(d, a)
			} else {
				return this.restrictY(d, a)
			}
		}
	},
	restrictX : function(b, a) {
		if (!a) {
			a = 1
		}
		if (b <= this.x) {
			b -= (b - this.x) * a
		} else {
			if (b >= this.right) {
				b -= (b - this.right) * a
			}
		}
		return b
	},
	restrictY : function(b, a) {
		if (!a) {
			a = 1
		}
		if (b <= this.y) {
			b -= (b - this.y) * a
		} else {
			if (b >= this.bottom) {
				b -= (b - this.bottom) * a
			}
		}
		return b
	},
	getSize : function() {
		return {
			width : this.right - this.x,
			height : this.bottom - this.y
		}
	},
	copy : function() {
		return new this.self(this.y, this.right, this.bottom, this.x)
	},
	copyFrom : function(b) {
		var a = this;
		a.top = a.y = a[1] = b.y;
		a.right = b.right;
		a.bottom = b.bottom;
		a.left = a.x = a[0] = b.x;
		return this
	},
	toString : function() {
		return "Region[" + this.top + "," + this.right + "," + this.bottom
				+ "," + this.left + "]"
	},
	translateBy : function(a, c) {
		if (arguments.length == 1) {
			c = a.y;
			a = a.x
		}
		var b = this;
		b.top = b.y += c;
		b.right += a;
		b.bottom += c;
		b.left = b.x += a;
		return b
	},
	round : function() {
		var a = this;
		a.top = a.y = Math.round(a.y);
		a.right = Math.round(a.right);
		a.bottom = Math.round(a.bottom);
		a.left = a.x = Math.round(a.x);
		return a
	},
	equals : function(a) {
		return (this.top == a.top && this.right == a.right
				&& this.bottom == a.bottom && this.left == a.left)
	}
});
Ext.define("Ext.XTemplate", {
	extend : "Ext.Template",
	statics : {
		from : function(b, a) {
			b = Ext.getDom(b);
			return new this(b.value || b.innerHTML, a || {})
		}
	},
	argsRe : /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,
	nameRe : /^<tpl\b[^>]*?for="(.*?)"/,
	ifRe : /^<tpl\b[^>]*?if="(.*?)"/,
	execRe : /^<tpl\b[^>]*?exec="(.*?)"/,
	constructor : function() {
		this.callParent(arguments);
		var x = this, h = x.html, u = x.argsRe, c = x.nameRe, s = x.ifRe, w = x.execRe, o = 0, j = [], n = "values", v = "parent", k = "xindex", l = "xcount", d = "return ", b = "with(values){ ", p, f, t, a, e, g, q, y, r;
		h = ["<tpl>", h, "</tpl>"].join("");
		while ((p = h.match(u))) {
			e = null;
			g = null;
			q = null;
			f = p[0].match(c);
			t = p[0].match(s);
			a = p[0].match(w);
			e = t ? t[1] : null;
			if (e) {
				g = Ext.functionFactory(n, v, k, l, b + "try{" + d
								+ Ext.String.htmlDecode(e)
								+ ";}catch(e){return;}}")
			}
			e = a ? a[1] : null;
			if (e) {
				q = Ext.functionFactory(n, v, k, l, b
								+ Ext.String.htmlDecode(e) + ";}")
			}
			y = f ? f[1] : null;
			if (y) {
				if (y === ".") {
					y = n
				} else {
					if (y === "..") {
						y = v
					}
				}
				y = Ext.functionFactory(n, v, "try{" + b + d + y
								+ ";}}catch(e){return;}")
			}
			j.push({
						id : o,
						target : y,
						exec : q,
						test : g,
						body : p[1] || ""
					});
			h = h.replace(p[0], "{xtpl" + o + "}");
			o = o + 1
		}
		for (r = j.length - 1; r >= 0; --r) {
			x.compileTpl(j[r])
		}
		x.master = j[j.length - 1];
		x.tpls = j
	},
	applySubTemplate : function(g, a, c, e, f) {
		var d = this, b = d.tpls[g];
		return b.compiled.call(d, a, c, e, f)
	},
	codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g,
	re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?\}/g,
	compileTpl : function(tpl) {
		var fm = Ext.util.Format, me = this, useFormat = me.disableFormats !== true, body, bodyReturn, evaluatedFn;
		function fn(m, name, format, args, math) {
			var v;
			if (name.substr(0, 4) == "xtpl") {
				return "',this.applySubTemplate(" + name.substr(4)
						+ ", values, parent, xindex, xcount),'"
			}
			if (name == ".") {
				v = 'Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'
			} else {
				if (name == "#") {
					v = "xindex"
				} else {
					if (name.substr(0, 7) == "parent.") {
						v = name
					} else {
						if (name.indexOf(".") != -1) {
							v = "values." + name
						} else {
							v = "values['" + name + "']"
						}
					}
				}
			}
			if (math) {
				v = "(" + v + math + ")"
			}
			if (format && useFormat) {
				args = args ? "," + args : "";
				if (format.substr(0, 5) != "this.") {
					format = "fm." + format + "("
				} else {
					format = "this." + format.substr(5) + "("
				}
			} else {
				args = "";
				format = "(" + v + " === undefined ? '' : "
			}
			return "'," + format + v + args + "),'"
		}
		function codeFn(m, code) {
			return "',(" + code.replace(me.compileARe, "'") + "),'"
		}
		bodyReturn = tpl.body.replace(me.compileBRe, "\\n").replace(
				me.compileCRe, "\\'").replace(me.re, fn).replace(me.codeRe,
				codeFn);
		body = "evaluatedFn = function(values, parent, xindex, xcount){return ['"
				+ bodyReturn + "'].join('');};";
		eval(body);
		tpl.compiled = function(values, parent, xindex, xcount) {
			var vs, length, buffer, i;
			if (tpl.test && !tpl.test.call(me, values, parent, xindex, xcount)) {
				return ""
			}
			vs = tpl.target ? tpl.target.call(me, values, parent) : values;
			if (!vs) {
				return ""
			}
			parent = tpl.target ? values : parent;
			if (tpl.target && Ext.isArray(vs)) {
				buffer = [];
				length = vs.length;
				if (tpl.exec) {
					for (i = 0; i < length; i++) {
						buffer[buffer.length] = evaluatedFn.call(me, vs[i],
								parent, i + 1, length);
						tpl.exec.call(me, vs[i], parent, i + 1, length)
					}
				} else {
					for (i = 0; i < length; i++) {
						buffer[buffer.length] = evaluatedFn.call(me, vs[i],
								parent, i + 1, length)
					}
				}
				return buffer.join("")
			}
			if (tpl.exec) {
				tpl.exec.call(me, vs, parent, xindex, xcount)
			}
			return evaluatedFn.call(me, vs, parent, xindex, xcount)
		};
		return this
	},
	applyTemplate : function(a) {
		return this.master.compiled.call(this, a, {}, 1, 1)
	},
	compile : function() {
		return this
	}
}, function() {
	this.createAlias("apply", "applyTemplate")
});
Ext.define("Ext.ModelManager", {
			extend : "Ext.AbstractManager",
			alternateClassName : "Ext.ModelMgr",
			requires : ["Ext.data.Association"],
			singleton : true,
			typeName : "mtype",
			associationStack : [],
			registerType : function(c, b) {
				var d = b.prototype, a;
				if (d && d.isModel) {
					a = b
				} else {
					if (!b.extend) {
						b.extend = "Ext.data.Model"
					}
					a = Ext.define(c, b)
				}
				this.types[c] = a;
				return a
			},
			onModelDefined : function(c) {
				var a = this.associationStack, f = a.length, e = [], b, d, g;
				for (d = 0; d < f; d++) {
					b = a[d];
					if (b.associatedModel == c.modelName) {
						e.push(b)
					}
				}
				for (d = 0, f = e.length; d < f; d++) {
					g = e[d];
					this.types[g.ownerModel].prototype.associations
							.add(Ext.data.Association.create(g));
					Ext.Array.remove(a, g)
				}
			},
			registerDeferredAssociation : function(a) {
				this.associationStack.push(a)
			},
			getModel : function(b) {
				var a = b;
				if (typeof a == "string") {
					a = this.types[a]
				}
				return a
			},
			create : function(c, b, d) {
				var a = typeof b == "function" ? b : this.types[b || c.name];
				return new a(c, d)
			}
		}, function() {
			Ext.regModel = function() {
				return this.ModelManager.registerType.apply(this.ModelManager,
						arguments)
			}
		});
Ext.define("Ext.form.Labelable", {
	requires : ["Ext.XTemplate"],
	labelableRenderTpl : [
			'<tpl if="!hideLabel && !(!fieldLabel && hideEmptyLabel)">',
			'<label<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',
			'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',
			"</label>",
			"</tpl>",
			'<div class="{baseBodyCls} {fieldBodyCls}"<tpl if="inputId"> id="{baseBodyCls}-{inputId}"</tpl> role="presentation">{subTplMarkup}</div>',
			'<div class="{errorMsgCls}" style="display:none"></div>',
			'<div class="{clearCls}" role="presentation"><!-- --></div>', {
				compiled : true,
				disableFormats : true
			}],
	activeErrorsTpl : [
			'<tpl if="errors && errors.length">',
			'<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',
			"</tpl>"],
	isFieldLabelable : true,
	formItemCls : Ext.baseCSSPrefix + "form-item",
	labelCls : Ext.baseCSSPrefix + "form-item-label",
	errorMsgCls : Ext.baseCSSPrefix + "form-error-msg",
	baseBodyCls : Ext.baseCSSPrefix + "form-item-body",
	fieldBodyCls : "",
	clearCls : Ext.baseCSSPrefix + "clear",
	invalidCls : Ext.baseCSSPrefix + "form-invalid",
	fieldLabel : undefined,
	labelAlign : "left",
	labelWidth : 100,
	labelPad : 5,
	labelSeparator : ":",
	hideLabel : false,
	hideEmptyLabel : true,
	preventMark : false,
	autoFitErrors : true,
	msgTarget : "qtip",
	initLabelable : function() {
		this.addCls(this.formItemCls);
		this.addEvents("errorchange")
	},
	getFieldLabel : function() {
		return this.fieldLabel || ""
	},
	getLabelableRenderData : function() {
		var d = this, b = d.labelAlign, c = d.labelPad, a;
		if (b === "top") {
			a = "margin-bottom:" + c + "px;"
		} else {
			a = "margin-right:" + c + "px;";
			if (Ext.isBorderBox) {
				a += "width:" + d.labelWidth + "px;"
			}
		}
		return Ext
				.copyTo(
						{
							inputId : d.getInputId(),
							fieldLabel : d.getFieldLabel(),
							labelStyle : a + (d.labelStyle || ""),
							subTplMarkup : d.getSubTplMarkup()
						},
						d,
						"hideLabel,hideEmptyLabel,labelCls,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator",
						true)
	},
	getLabelableSelectors : function() {
		return {
			labelEl : "label." + this.labelCls,
			bodyEl : "." + this.baseBodyCls,
			errorEl : "." + this.errorMsgCls
		}
	},
	getSubTplMarkup : function() {
		return ""
	},
	getInputId : function() {
		return ""
	},
	getActiveError : function() {
		return this.activeError || ""
	},
	hasActiveError : function() {
		return !!this.getActiveError()
	},
	setActiveError : function(a) {
		this.activeError = a;
		this.activeErrors = [a];
		this.renderActiveError()
	},
	getActiveErrors : function() {
		return this.activeErrors || []
	},
	setActiveErrors : function(a) {
		this.activeErrors = a;
		this.activeError = this.getTpl("activeErrorsTpl").apply({
					errors : a
				});
		this.renderActiveError()
	},
	unsetActiveError : function() {
		delete this.activeError;
		delete this.activeErrors;
		this.renderActiveError()
	},
	renderActiveError : function() {
		var c = this, b = c.getActiveError(), a = !!b;
		if (b !== c.lastActiveError) {
			c.fireEvent("errorchange", c, b);
			c.lastActiveError = b
		}
		if (c.rendered && !c.isDestroyed && !c.preventMark) {
			c.el[a ? "addCls" : "removeCls"](c.invalidCls);
			c.getActionEl().dom.setAttribute("aria-invalid", a);
			c.errorEl.dom.innerHTML = b
		}
	},
	setFieldDefaults : function(b) {
		var a = this;
		Ext.iterate(b, function(c, d) {
					if (!a.hasOwnProperty(c)) {
						a[c] = d
					}
				})
	},
	getBodyNaturalWidth : function() {
		return this.bodyEl.getWidth()
	}
});
Ext.define("Ext.ComponentManager", {
			extend : "Ext.AbstractManager",
			alternateClassName : "Ext.ComponentMgr",
			singleton : true,
			typeName : "xtype",
			create : function(b, d) {
				if (b instanceof Ext.AbstractComponent) {
					return b
				} else {
					if (Ext.isString(b)) {
						return Ext.createByAlias("widget." + b)
					} else {
						var c = b.xtype || d, a = b;
						return Ext.createByAlias("widget." + c, a)
					}
				}
			},
			registerType : function(b, a) {
				this.types[b] = a;
				a[this.typeName] = b;
				a.prototype[this.typeName] = b
			}
		});
Ext.define("Ext.FocusManager", {
	singleton : true,
	alternateClassName : "Ext.FocusMgr",
	mixins : {
		observable : "Ext.util.Observable"
	},
	requires : ["Ext.ComponentManager", "Ext.ComponentQuery",
			"Ext.util.HashMap", "Ext.util.KeyNav"],
	enabled : false,
	focusElementCls : Ext.baseCSSPrefix + "focus-element",
	focusFrameCls : Ext.baseCSSPrefix + "focus-frame",
	whitelist : ["textfield"],
	tabIndexWhitelist : ["a", "button", "embed", "frame", "iframe", "img",
			"input", "object", "select", "textarea"],
	constructor : function() {
		var a = this, b = Ext.ComponentQuery;
		a.addEvents("beforecomponentfocus", "componentfocus", "disable",
				"enable");
		a.keyNav = Ext.create("Ext.util.KeyNav", Ext.getDoc(), {
					disabled : true,
					scope : a,
					backspace : a.focusLast,
					enter : a.navigateIn,
					esc : a.navigateOut,
					tab : a.navigateSiblings
				});
		a.focusData = {};
		a.subscribers = Ext.create("Ext.util.HashMap");
		a.focusChain = {};
		Ext.apply(b.pseudos, {
			focusable : function(f) {
				var d = f.length, h = [], g = 0, j, e = function(c) {
					return c
							&& c.focusable !== false
							&& b
									.is(
											c,
											"[rendered]:not([destroying]):not([isDestroyed]):not([disabled]){isVisible(true)}{el && c.el.dom && c.el.isVisible()}")
				};
				for (; g < d; g++) {
					j = f[g];
					if (e(j)) {
						h.push(j)
					}
				}
				return h
			},
			nextFocus : function(f, e, h) {
				h = h || 1;
				e = parseInt(e, 10);
				var d = f.length, g = e + h, j;
				for (; g != e; g += h) {
					if (g >= d) {
						g = 0
					} else {
						if (g < 0) {
							g = d - 1
						}
					}
					j = f[g];
					if (b.is(j, ":focusable")) {
						return [j]
					} else {
						if (j.placeholder && b.is(j.placeholder, ":focusable")) {
							return [j.placeholder]
						}
					}
				}
				return []
			},
			prevFocus : function(d, c) {
				return this.nextFocus(d, c, -1)
			},
			root : function(e) {
				var d = e.length, g = [], f = 0, h;
				for (; f < d; f++) {
					h = e[f];
					if (!h.ownerCt) {
						g.push(h)
					}
				}
				return g
			}
		})
	},
	addXTypeToWhitelist : function(b) {
		var a = this;
		if (Ext.isArray(b)) {
			Ext.Array.forEach(b, a.addXTypeToWhitelist, a);
			return
		}
		if (!Ext.Array.contains(a.whitelist, b)) {
			a.whitelist.push(b)
		}
	},
	clearComponent : function(a) {
		clearTimeout(this.cmpFocusDelay);
		if (!a.isDestroyed) {
			a.blur()
		}
	},
	disable : function() {
		var a = this;
		if (!a.enabled) {
			return
		}
		delete a.options;
		a.enabled = false;
		Ext.ComponentManager.all.un("add", a.onComponentCreated, a);
		a.removeDOM();
		a.keyNav.disable();
		a.setFocusAll(false);
		a.fireEvent("disable", a)
	},
	enable : function(a) {
		var b = this;
		if (a === true) {
			a = {
				focusFrame : true
			}
		}
		b.options = a = a || {};
		if (b.enabled) {
			return
		}
		Ext.ComponentManager.all.on("add", b.onComponentCreated, b);
		b.initDOM(a);
		b.keyNav.enable();
		b.setFocusAll(true, a);
		b.focusEl.focus();
		delete b.focusedCmp;
		b.enabled = true;
		b.fireEvent("enable", b)
	},
	focusLast : function(b) {
		var a = this;
		if (a.isWhitelisted(a.focusedCmp)) {
			return true
		}
		if (a.previousFocusedCmp) {
			a.previousFocusedCmp.focus()
		}
	},
	getRootComponents : function() {
		var a = this, c = Ext.ComponentQuery, b = c
				.query(":focusable:root:not([floating])"), d = c
				.query(":focusable:root[floating]");
		d.sort(function(f, e) {
					return f.el.getZIndex() > e.el.getZIndex()
				});
		return d.concat(b)
	},
	initDOM : function(b) {
		var c = this, d = "&#160", a = c.focusFrameCls;
		if (!Ext.isReady) {
			Ext.onReady(c.initDOM, c);
			return
		}
		if (!c.focusEl) {
			c.focusEl = Ext.getBody().createChild({
						tabIndex : "-1",
						cls : c.focusElementCls,
						html : d
					})
		}
		if (!c.focusFrame && b.focusFrame) {
			c.focusFrame = Ext.getBody().createChild({
						cls : a,
						children : [{
									cls : a + "-top"
								}, {
									cls : a + "-bottom"
								}, {
									cls : a + "-left"
								}, {
									cls : a + "-right"
								}],
						style : "top: -100px; left: -100px;"
					});
			c.focusFrame.setVisibilityMode(Ext.core.Element.DISPLAY);
			c.focusFrameWidth = c.focusFrame.child("." + a + "-top")
					.getHeight();
			c.focusFrame.hide().setLeftTop(0, 0)
		}
	},
	isWhitelisted : function(a) {
		return a && Ext.Array.some(this.whitelist, function(b) {
					return a.isXType(b)
				})
	},
	navigateIn : function(d) {
		var b = this, a = b.focusedCmp, f, c;
		if (!a) {
			f = b.getRootComponents();
			if (f.length) {
				f[0].focus()
			}
		} else {
			c = Ext.ComponentQuery.query(">:focusable", a)[0];
			if (c) {
				c.focus()
			} else {
				if (Ext.isFunction(a.onClick)) {
					d.button = 0;
					a.onClick(d);
					a.focus()
				}
			}
		}
	},
	navigateOut : function(c) {
		var b = this, a;
		if (!b.focusedCmp || !(a = b.focusedCmp.up(":focusable"))) {
			b.focusEl.focus();
			return
		}
		a.focus()
	},
	navigateSiblings : function(h, b, m) {
		var i = this, a = b || i, n = h.getKey(), f = Ext.EventObject, j = h.shiftKey
				|| n == f.LEFT || n == f.UP, c = n == f.LEFT || n == f.RIGHT
				|| n == f.UP || n == f.DOWN, g = j ? "prev" : "next", l, d, k;
		k = (a.focusedCmp && a.focusedCmp.comp) || a.focusedCmp;
		if (!k && !m) {
			return
		}
		if (c && i.isWhitelisted(k)) {
			return true
		}
		m = m || k.up();
		if (m) {
			l = k ? Ext.Array.indexOf(m.getRefItems(), k) : -1;
			d = Ext.ComponentQuery.query(">:" + g + "Focus(" + l + ")", m)[0];
			if (d && k !== d) {
				d.focus();
				return d
			}
		}
	},
	onComponentBlur : function(b, c) {
		var a = this;
		if (a.focusedCmp === b) {
			a.previousFocusedCmp = b;
			delete a.focusedCmp
		}
		if (a.focusFrame) {
			a.focusFrame.hide()
		}
	},
	onComponentCreated : function(b, c, a) {
		this.setFocus(a, true, this.options)
	},
	onComponentDestroy : function(a) {
		this.setFocus(a, false)
	},
	onComponentFocus : function(n, k) {
		var l = this, a = l.focusChain;
		if (!Ext.ComponentQuery.is(n, ":focusable")) {
			l.clearComponent(n);
			if (a[n.id]) {
				return
			}
			var p = n.up();
			if (p) {
				a[n.id] = true;
				p.focus()
			}
			return
		}
		l.focusChain = {};
		clearTimeout(l.cmpFocusDelay);
		if (arguments.length !== 2) {
			l.cmpFocusDelay = Ext.defer(l.onComponentFocus, 90, l, [n, k]);
			return
		}
		if (l.fireEvent("beforecomponentfocus", l, n, l.previousFocusedCmp) === false) {
			l.clearComponent(n);
			return
		}
		l.focusedCmp = n;
		if (l.shouldShowFocusFrame(n)) {
			var r = "." + l.focusFrameCls + "-", b = l.focusFrame, f = l.focusFrameWidth, i = n.el
					.getPageBox(), q = i.top, c = i.left, m = i.width, g = i.height, h = b
					.child(r + "top"), d = b.child(r + "bottom"), o = b.child(r
					+ "left"), j = b.child(r + "right");
			h.setWidth(m - 2).setLeftTop(c + 1, q);
			d.setWidth(m - 2).setLeftTop(c + 1, q + g - f);
			o.setHeight(g - 2).setLeftTop(c, q + 1);
			j.setHeight(g - 2).setLeftTop(c + m - f, q + 1);
			b.show()
		}
		l.fireEvent("componentfocus", l, n, l.previousFocusedCmp)
	},
	onComponentHide : function(e) {
		var d = this, f = Ext.ComponentQuery, b = false, a, c;
		if (d.focusedCmp) {
			a = f.query("[id=" + d.focusedCmp.id + "]", e)[0];
			b = d.focusedCmp.id === e.id || a;
			if (a) {
				d.clearComponent(a)
			}
		}
		d.clearComponent(e);
		if (b) {
			c = f.query("^:focusable", e)[0];
			if (c) {
				c.focus()
			}
		}
	},
	removeDOM : function() {
		var a = this;
		if (a.enabled || a.subscribers.length) {
			return
		}
		Ext.destroy(a.focusEl, a.focusFrame);
		delete a.focusEl;
		delete a.focusFrame;
		delete a.focusFrameWidth
	},
	removeXTypeFromWhitelist : function(b) {
		var a = this;
		if (Ext.isArray(b)) {
			Ext.Array.forEach(b, a.removeXTypeFromWhitelist, a);
			return
		}
		Ext.Array.remove(a.whitelist, b)
	},
	setFocus : function(e, h, b) {
		var d = this, c, g, f, a = function(i) {
			return !Ext.Array.contains(d.tabIndexWhitelist, i.tagName
							.toLowerCase())
					&& i.tabIndex <= 0
		};
		b = b || {};
		if (!e.rendered) {
			e.on("afterrender", Ext.pass(d.setFocus, arguments, d), d, {
						single : true
					});
			return
		}
		c = e.getFocusEl();
		g = c.dom;
		if ((h && !d.focusData[e.id]) || (!h && d.focusData[e.id])) {
			if (h) {
				f = {
					focusFrame : b.focusFrame
				};
				if (a(g)) {
					f.tabIndex = g.tabIndex;
					g.tabIndex = -1
				}
				c.on({
					focus : f.focusFn = Ext.bind(d.onComponentFocus, d, [e], 0),
					blur : f.blurFn = Ext.bind(d.onComponentBlur, d, [e], 0),
					scope : d
				});
				e.on({
							hide : d.onComponentHide,
							close : d.onComponentHide,
							beforedestroy : d.onComponentDestroy,
							scope : d
						});
				d.focusData[e.id] = f
			} else {
				f = d.focusData[e.id];
				if ("tabIndex" in f) {
					g.tabIndex = f.tabIndex
				}
				c.un("focus", f.focusFn, d);
				c.un("blur", f.blurFn, d);
				e.un("hide", d.onComponentHide, d);
				e.un("close", d.onComponentHide, d);
				e.un("beforedestroy", d.onComponentDestroy, d);
				delete d.focusData[e.id]
			}
		}
	},
	setFocusAll : function(g, c) {
		var f = this, b = Ext.ComponentManager.all.getArray(), a = b.length, e, d = 0;
		for (; d < a; d++) {
			f.setFocus(b[d], g, c)
		}
	},
	setupSubscriberKeys : function(a, f) {
		var e = this, d = a.getFocusEl(), c = f.scope, b = {
			backspace : e.focusLast,
			enter : e.navigateIn,
			esc : e.navigateOut,
			scope : e
		}, g = function(h) {
			if (e.focusedCmp === a) {
				return e.navigateSiblings(h, e, a)
			} else {
				return e.navigateSiblings(h)
			}
		};
		Ext.iterate(f, function(i, h) {
					b[i] = function(k) {
						var j = g(k);
						if (Ext.isFunction(h) && h.call(c || a, k, j) === true) {
							return true
						}
						return j
					}
				}, e);
		return Ext.create("Ext.util.KeyNav", d, b)
	},
	shouldShowFocusFrame : function(c) {
		var b = this, a = b.options || {};
		if (!b.focusFrame || !c) {
			return false
		}
		if (a.focusFrame) {
			return true
		}
		if (b.focusData[c.id].focusFrame) {
			return true
		}
		return false
	},
	subscribe : function(a, c) {
		var f = this, e = Ext.Array, g = {}, d = f.subscribers, b = function(h) {
			if (h.isContainer && !d.containsKey(h.id)) {
				e.forEach(h.query(">"), b);
				f.setFocus(h, true, c);
				h.on("add", g.onAdd, f)
			} else {
				if (!h.isContainer) {
					f.setFocus(h, true, c)
				}
			}
		};
		if (!a || !a.isContainer) {
			return
		}
		if (!a.rendered) {
			a.on("afterrender", Ext.pass(f.subscribe, arguments, f), f, {
						single : true
					});
			return
		}
		f.initDOM(c);
		g.keyNav = f.setupSubscriberKeys(a, c.keys);
		g.onAdd = function(i, j, h) {
			b(j)
		};
		a.on("beforedestroy", f.unsubscribe, f);
		b(a);
		d.add(a.id, g)
	},
	unsubscribe : function(a) {
		var e = this, d = Ext.Array, c = e.subscribers, f, b = function(g) {
			if (g.isContainer && !c.containsKey(g.id)) {
				d.forEach(g.query(">"), b);
				e.setFocus(g, false);
				g.un("add", f.onAdd, e)
			} else {
				if (!g.isContainer) {
					e.setFocus(g, false)
				}
			}
		};
		if (!a || !c.containsKey(a.id)) {
			return
		}
		f = c.get(a.id);
		f.keyNav.destroy();
		a.un("beforedestroy", e.unsubscribe, e);
		c.removeAtKey(a.id);
		b(a);
		e.removeDOM()
	}
});
Ext.define("Ext.layout.component.Component", {
	extend : "Ext.layout.Layout",
	type : "component",
	monitorChildren : true,
	initLayout : function() {
		var c = this, a = c.owner, b = a.el;
		if (!c.initialized) {
			if (a.frameSize) {
				c.frameSize = a.frameSize
			} else {
				a.frameSize = c.frameSize = {
					top : 0,
					left : 0,
					bottom : 0,
					right : 0
				}
			}
		}
		c.callParent(arguments)
	},
	beforeLayout : function(b, j, k, i) {
		this.callParent(arguments);
		var g = this, c = g.owner, d = c.ownerCt, f = c.layout, e = c
				.isVisible(true), a = c.el.child, h;
		if (!k && !(Ext.isNumber(b) && Ext.isNumber(j)) && d && d.layout
				&& d.layout.fixedLayout && d != i) {
			g.doContainerLayout();
			return false
		}
		if (!e && (c.hiddenAncestor || c.floating)) {
			if (c.hiddenAncestor) {
				h = c.hiddenAncestor.layoutOnShow;
				h.remove(c);
				h.add(c)
			}
			c.needsLayout = {
				width : b,
				height : j,
				isSetSize : false
			}
		}
		if (e && this.needsLayout(b, j)) {
			g.rawWidth = b;
			g.rawHeight = j;
			return c.beforeComponentLayout(b, j, k, i)
		} else {
			return false
		}
	},
	needsLayout : function(b, a) {
		this.lastComponentSize = this.lastComponentSize || {
			width : -Infinity,
			height : -Infinity
		};
		return (this.childrenChanged || this.lastComponentSize.width !== b || this.lastComponentSize.height !== a)
	},
	setElementSize : function(c, b, a) {
		if (b !== undefined && a !== undefined) {
			c.setSize(b, a)
		} else {
			if (a !== undefined) {
				c.setHeight(a)
			} else {
				if (b !== undefined) {
					c.setWidth(b)
				}
			}
		}
	},
	getTarget : function() {
		return this.owner.el
	},
	getRenderTarget : function() {
		return this.owner.el
	},
	setTargetSize : function(d, a) {
		var e = this;
		e.setElementSize(e.owner.el, d, a);
		if (e.owner.frameBody) {
			var g = e.getTargetInfo(), f = g.padding, c = g.border, b = e.frameSize;
			e.setElementSize(e.owner.frameBody,
					Ext.isNumber(d) ? (d - b.left - b.right - f.left - f.right
							- c.left - c.right) : d,
					Ext.isNumber(a) ? (a - b.top - b.bottom - f.top - f.bottom
							- c.top - c.bottom) : a)
		}
		e.autoSized = {
			width : !Ext.isNumber(d),
			height : !Ext.isNumber(a)
		};
		e.lastComponentSize = {
			width : d,
			height : a
		}
	},
	getTargetInfo : function() {
		if (!this.targetInfo) {
			var b = this.getTarget(), a = this.owner.getTargetEl();
			this.targetInfo = {
				padding : {
					top : b.getPadding("t"),
					right : b.getPadding("r"),
					bottom : b.getPadding("b"),
					left : b.getPadding("l")
				},
				border : {
					top : b.getBorderWidth("t"),
					right : b.getBorderWidth("r"),
					bottom : b.getBorderWidth("b"),
					left : b.getBorderWidth("l")
				},
				bodyMargin : {
					top : a.getMargin("t"),
					right : a.getMargin("r"),
					bottom : a.getMargin("b"),
					left : a.getMargin("l")
				}
			}
		}
		return this.targetInfo
	},
	doOwnerCtLayouts : function() {
		var a = this.owner, c = a.ownerCt, b, d;
		if (!c) {
			return
		}
		b = c.componentLayout;
		d = c.layout;
		if (!a.floating && b && b.monitorChildren && !b.layoutBusy) {
			if (!c.suspendLayout && d && !d.layoutBusy) {
				if (d.bindToOwnerCtComponent === true) {
					c.doComponentLayout()
				} else {
					if (d.bindToOwnerCtContainer === true) {
						d.layout()
					}
				}
			}
		}
	},
	doContainerLayout : function() {
		var e = this, a = e.owner, c = a.ownerCt, d = a.layout, b;
		if (!a.suspendLayout && d && d.isLayout && !d.layoutBusy) {
			d.layout()
		}
		if (c && c.componentLayout) {
			b = c.componentLayout;
			if (!a.floating && b.monitorChildren && !b.layoutBusy) {
				b.childrenChanged = true
			}
		}
	},
	afterLayout : function(c, a, b, d) {
		this.doContainerLayout();
		this.owner.afterComponentLayout(c, a, b, d)
	}
});
Ext.define("Ext.layout.component.Button", {
	alias : ["layout.button"],
	extend : "Ext.layout.component.Component",
	type : "button",
	cellClsRE : /-btn-(tl|br)\b/,
	htmlRE : /<.*>/,
	beforeLayout : function() {
		return this.callParent(arguments) || this.lastText !== this.owner.text
	},
	onLayout : function(c, l) {
		var i = this, f = Ext.isNumber, d = i.owner, k = d.el, g = d.btnEl, e = d.btnInnerEl, b = d.minWidth, j = d.maxWidth, a, m, h;
		i.getTargetInfo();
		i.callParent(arguments);
		e.unclip();
		i.setTargetSize(c, l);
		if (!f(c)) {
			if (d.text && Ext.isIE7 && Ext.isStrict && g && g.getWidth() > 20) {
				m = i.btnFrameWidth;
				h = Ext.util.TextMetrics.measure(e, d.text);
				k.setWidth(h.width + m + i.adjWidth);
				g.setWidth(h.width + m);
				e.setWidth(h.width + m)
			} else {
				k.setWidth(null);
				g.setWidth(null);
				e.setWidth(null)
			}
			if (b || j) {
				a = k.getWidth();
				if (b && (a < b)) {
					i.setTargetSize(b, l)
				} else {
					if (j && (a > j)) {
						e.clip();
						i.setTargetSize(j, l)
					}
				}
			}
		}
		this.lastText = d.text
	},
	setTargetSize : function(a, k) {
		var g = this, b = g.owner, e = Ext.isNumber, d = b.btnInnerEl, i = (e(a)
				? a - g.adjWidth
				: a), f = (e(k) ? k - g.adjHeight : k), c = g.btnFrameHeight, j = b
				.getText(), h;
		g.callParent(arguments);
		g.setElementSize(b.btnEl, i, f);
		g.setElementSize(d, i, f);
		if (e(f)) {
			d.setStyle("line-height", f - c + "px")
		}
		if (j && this.htmlRE.test(j)) {
			d.setStyle("line-height", "normal");
			h = Ext.util.TextMetrics.measure(d, j).height;
			d.setStyle("padding-top", g.btnFrameTop
							+ Math.max(d.getHeight() - c - h, 0) / 2 + "px");
			g.setElementSize(d, i, f)
		}
	},
	getTargetInfo : function() {
		var e = this, a = e.owner, d = a.el, c = e.frameSize, g = a.frameBody, b = a.btnWrap, f = a.btnInnerEl;
		if (!("adjWidth" in e)) {
			Ext.apply(e, {
						adjWidth : c.left + c.right + d.getBorderWidth("lr")
								+ d.getPadding("lr") + b.getPadding("lr")
								+ (g ? g.getFrameWidth("lr") : 0),
						adjHeight : c.top + c.bottom + d.getBorderWidth("tb")
								+ d.getPadding("tb") + b.getPadding("tb")
								+ (g ? g.getFrameWidth("tb") : 0),
						btnFrameWidth : f.getFrameWidth("lr"),
						btnFrameHeight : f.getFrameWidth("tb"),
						btnFrameTop : f.getFrameWidth("t")
					})
		}
		return e.callParent()
	}
});
Ext.define("Ext.layout.component.ProgressBar", {
			alias : ["layout.progressbar"],
			extend : "Ext.layout.component.Component",
			type : "progressbar",
			onLayout : function(d, b) {
				var e = this, a = e.owner, c = a.textEl;
				e.setElementSize(a.el, d, b);
				c.setWidth(a.el.getWidth(true));
				e.callParent([d, b]);
				a.updateProgress(a.value)
			}
		});
Ext.define("Ext.layout.component.field.Field", {
	alias : ["layout.field"],
	extend : "Ext.layout.component.Component",
	uses : ["Ext.tip.QuickTip", "Ext.util.TextMetrics"],
	type : "field",
	beforeLayout : function(b, a) {
		var c = this;
		return c.callParent(arguments)
				|| (!c.owner.preventMark && c.activeError !== c.owner
						.getActiveError())
	},
	onLayout : function(a, l) {
		var f = this, b = f.owner, e = f.getLabelStrategy(), k = f
				.getErrorStrategy(), i = Ext.isDefined, m = Ext.isNumber, h, g, j, c, d;
		h = f.lastComponentSize || {};
		if (!i(a)) {
			a = h.width;
			if (a < 0) {
				a = d
			}
		}
		if (!i(l)) {
			l = h.height;
			if (l < 0) {
				l = d
			}
		}
		g = !m(a);
		j = !m(l);
		c = {
			autoWidth : g,
			autoHeight : j,
			width : g ? b.getBodyNaturalWidth() : a,
			height : l,
			insets : {
				top : 0,
				right : 0,
				bottom : 0,
				left : 0
			}
		};
		e.prepare(b, c);
		k.prepare(b, c);
		e.adjustHorizInsets(b, c);
		k.adjustHorizInsets(b, c);
		e.layoutHoriz(b, c);
		k.layoutHoriz(b, c);
		e.adjustVertInsets(b, c);
		k.adjustVertInsets(b, c);
		e.layoutVert(b, c);
		k.layoutVert(b, c);
		if (g && j) {
			f.setElementSize(b.el, c.width, c.height)
		} else {
			f.setTargetSize(c.width, c.height)
		}
		f.sizeBody(c);
		f.activeError = b.getActiveError()
	},
	sizeBody : function(h) {
		var g = this, c = g.owner, d = h.insets, b = h.width, e = h.height, f = Ext
				.isNumber(b) ? b - d.left - d.right : b, a = Ext.isNumber(e)
				? e - d.top - d.bottom
				: e;
		g.setElementSize(c.bodyEl, f, a);
		g.sizeBodyContents(f, a)
	},
	sizeBodyContents : Ext.emptyFn,
	getLabelStrategy : function() {
		var b = this, c = b.labelStrategies, a = b.owner.labelAlign;
		return c[a] || c.base
	},
	getErrorStrategy : function() {
		var c = this, a = c.owner, d = c.errorStrategies, b = a.msgTarget;
		return !a.preventMark && Ext.isString(b)
				? (d[b] || d.elementId)
				: d.none
	},
	labelStrategies : (function() {
		var b = Ext.applyIf, a = Ext.emptyFn, c = {
			prepare : function(e, h) {
				var f = e.labelCls + "-" + e.labelAlign, g = e.labelEl;
				if (g && !g.hasCls(f)) {
					g.addCls(f)
				}
			},
			adjustHorizInsets : a,
			adjustVertInsets : a,
			layoutHoriz : a,
			layoutVert : a
		}, d = b({
					prepare : function(e, f) {
						c.prepare(e, f);
						if (f.autoWidth) {
							f.width += (!e.labelEl ? 0 : e.labelWidth
									+ e.labelPad)
						}
					},
					adjustHorizInsets : function(e, f) {
						if (e.labelEl) {
							f.insets.left += e.labelWidth + e.labelPad
						}
					},
					layoutHoriz : function(e, g) {
						var f = e.labelEl;
						if (f && !e.isLabelSized && !Ext.isBorderBox) {
							f.setWidth(e.labelWidth);
							e.isLabelSized = true
						}
					}
				}, c);
		return {
			base : c,
			top : b({
						adjustVertInsets : function(e, g) {
							var f = e.labelEl;
							if (f) {
								g.insets.top += Ext.util.TextMetrics.measure(f,
										e.fieldLabel, g.width).height
										+ f.getFrameWidth("tb") + e.labelPad
							}
						}
					}, c),
			left : d,
			right : d
		}
	})(),
	errorStrategies : (function() {
		function c(g, f) {
			var h = g.getStyle("display") !== "none";
			if (f !== h) {
				g.setDisplayed(f)
			}
		}
		function e(g, f, h) {
			if (g.getStyle(f) !== h) {
				g.setStyle(f, h)
			}
		}
		var b = Ext.applyIf, a = Ext.emptyFn, d = {
			prepare : function(f) {
				c(f.errorEl, false)
			},
			adjustHorizInsets : a,
			adjustVertInsets : a,
			layoutHoriz : a,
			layoutVert : a
		};
		return {
			none : d,
			side : b({
						prepare : function(f) {
							var g = f.errorEl;
							g.addCls(Ext.baseCSSPrefix + "form-invalid-icon");
							Ext.layout.component.field.Field.initTip();
							g.dom.setAttribute("data-errorqtip", f
											.getActiveError()
											|| "");
							c(g, f.hasActiveError())
						},
						adjustHorizInsets : function(f, g) {
							if (f.autoFitErrors && f.hasActiveError()) {
								g.insets.right += f.errorEl.getWidth()
							}
						},
						layoutHoriz : function(f, g) {
							if (f.hasActiveError()) {
								e(f.errorEl, "left", g.width - g.insets.right
												+ "px")
							}
						},
						layoutVert : function(f, g) {
							if (f.hasActiveError()) {
								e(f.errorEl, "top", g.insets.top + "px")
							}
						}
					}, d),
			under : b({
						prepare : function(f) {
							var h = f.errorEl, g = Ext.baseCSSPrefix
									+ "form-invalid-under";
							if (!h.hasCls(g)) {
								h.addCls(g)
							}
							c(h, f.hasActiveError())
						},
						adjustVertInsets : function(f, g) {
							if (f.autoFitErrors) {
								g.insets.bottom += f.errorEl.getHeight()
							}
						},
						layoutHoriz : function(f, h) {
							var i = f.errorEl, g = h.insets;
							e(i, "width", h.width - g.right - g.left + "px");
							e(i, "marginLeft", g.left + "px")
						}
					}, d),
			qtip : b({
						prepare : function(f) {
							c(f.errorEl, false);
							Ext.layout.component.field.Field.initTip();
							f.getActionEl().dom.setAttribute("data-errorqtip",
									f.getActiveError() || "")
						}
					}, d),
			title : b({
						prepare : function(f) {
							c(f.errorEl, false);
							f.el.dom.title = f.getActiveError() || ""
						}
					}, d),
			elementId : b({
						prepare : function(f) {
							c(f.errorEl, false);
							var g = Ext.fly(f.msgTarget);
							if (g) {
								g.dom.innerHTML = f.getActiveError() || "";
								g.setDisplayed(f.hasActiveError())
							}
						}
					}, d)
		}
	})(),
	statics : {
		initTip : function() {
			var a = this.tip;
			if (!a) {
				a = this.tip = Ext.create("Ext.tip.QuickTip", {
							baseCls : Ext.baseCSSPrefix + "form-invalid-tip",
							renderTo : Ext.getBody()
						});
				a.tagConfig = Ext.apply({}, {
							attribute : "errorqtip"
						}, a.tagConfig)
			}
		},
		destroyTip : function() {
			var a = this.tip;
			if (a) {
				a.destroy();
				delete this.tip
			}
		}
	}
});
Ext.define("Ext.layout.component.field.Text", {
	extend : "Ext.layout.component.field.Field",
	alias : "layout.textfield",
	requires : ["Ext.util.TextMetrics"],
	type : "textfield",
	beforeLayout : function(d, b) {
		var e = this, a = e.owner, c = this.lastValue, f = a.getRawValue();
		this.lastValue = f;
		return e.callParent(arguments) || (a.grow && f !== c)
	},
	sizeBodyContents : function(c, a) {
		var b = this.adjustForGrow(c, a);
		this.setElementSize(this.owner.inputEl, b[0], b[1])
	},
	adjustForGrow : function(e, c) {
		var f = this, b = f.owner, h, g, d, a = [e, c];
		if (b.grow) {
			h = b.inputEl;
			g = (h.dom.value || (b.hasFocus ? "" : b.emptyText) || "")
					+ b.growAppend;
			d = h.getTextWidth(g) + h.getBorderWidth("lr") + h.getPadding("lr");
			a[0] = Ext.Number.constrain(d, b.growMin, Math.max(b.growMin, Math
									.min(b.growMax, Ext.isNumber(e)
													? e
													: Infinity)))
		}
		return a
	}
});
Ext.define("Ext.layout.component.field.TextArea", {
			extend : "Ext.layout.component.field.Text",
			alias : "layout.textareafield",
			type : "textareafield",
			adjustForGrow : function(a, j) {
				var e = this, b = e.owner, h, g, f, d, c, i, k = [a, j];
				if (b.grow) {
					h = b.inputEl;
					d = h.getWidth(true);
					c = h.getHeight();
					g = h.dom.value || "&#160;";
					g += b.growAppend;
					g = g.replace(/\n/g, "<br>");
					i = Ext.util.TextMetrics.measure(h, g, d).height
							+ h.getBorderWidth("tb") + h.getPadding("tb");
					f = b.growMax;
					if (Ext.isNumber(j)) {
						f = Math.min(f, j)
					}
					k[1] = Ext.Number.constrain(i, b.growMin, f)
				}
				return k
			}
		});
Ext.define("Ext.layout.component.field.HtmlEditor", {
	extend : "Ext.layout.component.field.Field",
	alias : ["layout.htmleditor"],
	type : "htmleditor",
	sizeBodyContents : function(a, h) {
		var e = this, b = e.owner, i = b.bodyEl, f = b.getToolbar(), g = b.textareaEl, c = b.iframeEl, d;
		if (Ext.isNumber(a)) {
			a -= i.getFrameWidth("lr")
		}
		f.setWidth(a);
		g.setWidth(a);
		c.setWidth(a);
		if (Ext.isNumber(h)) {
			d = h - f.getHeight() - i.getFrameWidth("tb");
			g.setHeight(d);
			c.setHeight(d)
		}
	}
});
Ext.define("Ext.layout.container.AbstractContainer", {
			extend : "Ext.layout.Layout",
			type : "container",
			fixedLayout : true,
			managedHeight : true,
			managedWidth : true,
			bindToOwnerCtComponent : false,
			bindToOwnerCtContainer : false,
			isManaged : function(d) {
				d = Ext.String.capitalize(d);
				var b = this, e = b, c = b["managed" + d], a = b.owner.ownerCt;
				if (a && a.layout) {
					while (a && a.layout) {
						if (c === false || a.layout["managed" + d] === false) {
							c = false;
							break
						}
						a = a.ownerCt
					}
				}
				return c
			},
			layout : function() {
				var b = this, a = b.owner;
				if (Ext.isNumber(a.height) || a.isViewport) {
					b.managedHeight = false
				}
				if (Ext.isNumber(a.width) || a.isViewport) {
					b.managedWidth = false
				}
				b.callParent(arguments)
			},
			setItemSize : function(c, b, a) {
				if (Ext.isObject(b)) {
					a = b.height;
					b = b.width
				}
				c.setCalculatedSize(b, a, this.owner)
			},
			getLayoutItems : function() {
				return this.owner && this.owner.items && this.owner.items.items
						|| []
			},
			afterLayout : function() {
				this.owner.afterLayout(this)
			},
			getTarget : function() {
				return this.owner.getTargetEl()
			},
			getRenderTarget : function() {
				return this.owner.getTargetEl()
			}
		});
Ext.define("Ext.layout.container.Container", {
	extend : "Ext.layout.container.AbstractContainer",
	alternateClassName : "Ext.layout.ContainerLayout",
	layoutItem : function(b, a) {
		a = a || {};
		if (b.componentLayout.initialized !== true) {
			this.setItemSize(b, a.width || b.width || undefined, a.height
							|| b.height || undefined)
		}
	},
	getLayoutTargetSize : function() {
		var b = this.getTarget(), a;
		if (b) {
			a = b.getViewSize();
			if (Ext.isIE && a.width == 0) {
				a = b.getStyleSize()
			}
			a.width -= b.getPadding("lr");
			a.height -= b.getPadding("tb")
		}
		return a
	},
	beforeLayout : function() {
		if (this.owner.beforeLayout(arguments) !== false) {
			return this.callParent(arguments)
		} else {
			return false
		}
	},
	afterLayout : function() {
		this.owner.afterLayout(arguments);
		this.callParent(arguments)
	},
	getRenderedItems : function() {
		var e = this, g = e.getTarget(), a = e.getLayoutItems(), d = a.length, f = [], b, c;
		for (b = 0; b < d; b++) {
			c = a[b];
			if (c.rendered && e.isValidParent(c, g, b)) {
				f.push(c)
			}
		}
		return f
	},
	getVisibleItems : function() {
		var f = this.getTarget(), b = this.getLayoutItems(), e = b.length, a = [], c, d;
		for (c = 0; c < e; c++) {
			d = b[c];
			if (d.rendered && this.isValidParent(d, f, c) && d.hidden !== true) {
				a.push(d)
			}
		}
		return a
	}
});
Ext.define("Ext.layout.container.Anchor", {
	alias : "layout.anchor",
	extend : "Ext.layout.container.Container",
	alternateClassName : "Ext.layout.AnchorLayout",
	type : "anchor",
	defaultAnchor : "100%",
	parseAnchorRE : /^(r|right|b|bottom)$/i,
	onLayout : function() {
		this.callParent(arguments);
		var u = this, o = u.getLayoutTargetSize(), a = u.owner, w = u
				.getTarget(), v = o.width, m = o.height, p = w
				.getStyle("overflow"), n = u.getVisibleItems(a), s = n.length, g = [], k, q, b, t, l, j, d, f, e, h, r, c;
		if (v < 20 && m < 20) {
			return
		}
		if (!u.clearEl) {
			u.clearEl = w.createChild({
						cls : Ext.baseCSSPrefix + "clear",
						role : "presentation"
					})
		}
		if (a.anchorSize) {
			if (typeof a.anchorSize == "number") {
				b = a.anchorSize
			} else {
				b = a.anchorSize.width;
				t = a.anchorSize.height
			}
		} else {
			b = a.initialConfig.width;
			t = a.initialConfig.height
		}
		if (!Ext.supports.RightMargin) {
			w.addCls(Ext.baseCSSPrefix + "inline-children")
		}
		for (r = 0; r < s; r++) {
			l = n[r];
			c = l.el;
			h = l.anchor;
			if (!l.anchor && l.items && !Ext.isNumber(l.width)
					&& !(Ext.isIE6 && Ext.isStrict)) {
				l.anchor = h = u.defaultAnchor
			}
			if (h) {
				j = l.anchorSpec;
				if (!j) {
					e = h.split(" ");
					l.anchorSpec = j = {
						right : u.parseAnchor(e[0], l.initialConfig.width, b),
						bottom : u.parseAnchor(e[1], l.initialConfig.height, t)
					}
				}
				d = j.right ? u.adjustWidthAnchor(j.right(v)
								- c.getMargin("lr"), l) : undefined;
				f = j.bottom ? u.adjustHeightAnchor(j.bottom(m)
								- c.getMargin("tb"), l) : undefined;
				g.push({
							component : l,
							anchor : true,
							width : d || undefined,
							height : f || undefined
						})
			} else {
				g.push({
							component : l,
							anchor : false
						})
			}
		}
		if (!Ext.supports.RightMargin) {
			w.removeCls(Ext.baseCSSPrefix + "inline-children")
		}
		for (r = 0; r < s; r++) {
			k = g[r];
			u.setItemSize(k.component, k.width, k.height)
		}
		if (p && p != "hidden" && !u.adjustmentPass) {
			q = u.getLayoutTargetSize();
			if (q.width != o.width || q.height != o.height) {
				u.adjustmentPass = true;
				u.onLayout()
			}
		}
		delete u.adjustmentPass
	},
	parseAnchor : function(c, f, b) {
		if (c && c != "none") {
			var d;
			if (this.parseAnchorRE.test(c)) {
				var e = b - f;
				return function(a) {
					return a - e
				}
			} else {
				if (c.indexOf("%") != -1) {
					d = parseFloat(c.replace("%", "")) * 0.01;
					return function(a) {
						return Math.floor(a * d)
					}
				} else {
					c = parseInt(c, 10);
					if (!isNaN(c)) {
						return function(a) {
							return a + c
						}
					}
				}
			}
		}
		return null
	},
	adjustWidthAnchor : function(b, a) {
		return b
	},
	adjustHeightAnchor : function(b, a) {
		return b
	}
});
Ext.define("Ext.dd.DragDropManager", {
	singleton : true,
	requires : ["Ext.util.Region"],
	uses : ["Ext.tip.QuickTipManager"],
	alternateClassName : ["Ext.dd.DragDropMgr", "Ext.dd.DDM"],
	ids : {},
	handleIds : {},
	dragCurrent : null,
	dragOvers : {},
	deltaX : 0,
	deltaY : 0,
	preventDefault : true,
	stopPropagation : true,
	initialized : false,
	locked : false,
	init : function() {
		this.initialized = true
	},
	POINT : 0,
	INTERSECT : 1,
	mode : 0,
	_execOnAll : function(c, b) {
		for (var d in this.ids) {
			for (var a in this.ids[d]) {
				var e = this.ids[d][a];
				if (!this.isTypeOfDD(e)) {
					continue
				}
				e[c].apply(e, b)
			}
		}
	},
	_onLoad : function() {
		this.init();
		var a = Ext.EventManager;
		a.on(document, "mouseup", this.handleMouseUp, this, true);
		a.on(document, "mousemove", this.handleMouseMove, this, true);
		a.on(window, "unload", this._onUnload, this, true);
		a.on(window, "resize", this._onResize, this, true)
	},
	_onResize : function(a) {
		this._execOnAll("resetConstraints", [])
	},
	lock : function() {
		this.locked = true
	},
	unlock : function() {
		this.locked = false
	},
	isLocked : function() {
		return this.locked
	},
	locationCache : {},
	useCache : true,
	clickPixelThresh : 3,
	clickTimeThresh : 350,
	dragThreshMet : false,
	clickTimeout : null,
	startX : 0,
	startY : 0,
	regDragDrop : function(b, a) {
		if (!this.initialized) {
			this.init()
		}
		if (!this.ids[a]) {
			this.ids[a] = {}
		}
		this.ids[a][b.id] = b
	},
	removeDDFromGroup : function(c, a) {
		if (!this.ids[a]) {
			this.ids[a] = {}
		}
		var b = this.ids[a];
		if (b && b[c.id]) {
			delete b[c.id]
		}
	},
	_remove : function(b) {
		for (var a in b.groups) {
			if (a && this.ids[a] && this.ids[a][b.id]) {
				delete this.ids[a][b.id]
			}
		}
		delete this.handleIds[b.id]
	},
	regHandle : function(b, a) {
		if (!this.handleIds[b]) {
			this.handleIds[b] = {}
		}
		this.handleIds[b][a] = a
	},
	isDragDrop : function(a) {
		return (this.getDDById(a)) ? true : false
	},
	getRelated : function(f, b) {
		var e = [];
		for (var d in f.groups) {
			for (var c in this.ids[d]) {
				var a = this.ids[d][c];
				if (!this.isTypeOfDD(a)) {
					continue
				}
				if (!b || a.isTarget) {
					e[e.length] = a
				}
			}
		}
		return e
	},
	isLegalTarget : function(e, d) {
		var b = this.getRelated(e, true);
		for (var c = 0, a = b.length; c < a; ++c) {
			if (b[c].id == d.id) {
				return true
			}
		}
		return false
	},
	isTypeOfDD : function(a) {
		return (a && a.__ygDragDrop)
	},
	isHandle : function(b, a) {
		return (this.handleIds[b] && this.handleIds[b][a])
	},
	getDDById : function(b) {
		for (var a in this.ids) {
			if (this.ids[a][b]) {
				return this.ids[a][b]
			}
		}
		return null
	},
	handleMouseDown : function(c, b) {
		if (Ext.tip.QuickTipManager) {
			Ext.tip.QuickTipManager.ddDisable()
		}
		if (this.dragCurrent) {
			this.handleMouseUp(c)
		}
		this.currentTarget = c.getTarget();
		this.dragCurrent = b;
		var a = b.getEl();
		this.startX = c.getPageX();
		this.startY = c.getPageY();
		this.deltaX = this.startX - a.offsetLeft;
		this.deltaY = this.startY - a.offsetTop;
		this.dragThreshMet = false;
		this.clickTimeout = setTimeout(function() {
					var d = Ext.dd.DragDropManager;
					d.startDrag(d.startX, d.startY)
				}, this.clickTimeThresh)
	},
	startDrag : function(a, b) {
		clearTimeout(this.clickTimeout);
		if (this.dragCurrent) {
			this.dragCurrent.b4StartDrag(a, b);
			this.dragCurrent.startDrag(a, b)
		}
		this.dragThreshMet = true
	},
	handleMouseUp : function(a) {
		if (Ext.tip.QuickTipManager) {
			Ext.tip.QuickTipManager.ddEnable()
		}
		if (!this.dragCurrent) {
			return
		}
		clearTimeout(this.clickTimeout);
		if (this.dragThreshMet) {
			this.fireEvents(a, true)
		} else {
		}
		this.stopDrag(a);
		this.stopEvent(a)
	},
	stopEvent : function(a) {
		if (this.stopPropagation) {
			a.stopPropagation()
		}
		if (this.preventDefault) {
			a.preventDefault()
		}
	},
	stopDrag : function(a) {
		if (this.dragCurrent) {
			if (this.dragThreshMet) {
				this.dragCurrent.b4EndDrag(a);
				this.dragCurrent.endDrag(a)
			}
			this.dragCurrent.onMouseUp(a)
		}
		this.dragCurrent = null;
		this.dragOvers = {}
	},
	handleMouseMove : function(c) {
		if (!this.dragCurrent) {
			return true
		}
		if (Ext.isIE && (c.button !== 0 && c.button !== 1 && c.button !== 2)) {
			this.stopEvent(c);
			return this.handleMouseUp(c)
		}
		if (!this.dragThreshMet) {
			var b = Math.abs(this.startX - c.getPageX());
			var a = Math.abs(this.startY - c.getPageY());
			if (b > this.clickPixelThresh || a > this.clickPixelThresh) {
				this.startDrag(this.startX, this.startY)
			}
		}
		if (this.dragThreshMet) {
			this.dragCurrent.b4Drag(c);
			this.dragCurrent.onDrag(c);
			if (!this.dragCurrent.moveOnly) {
				this.fireEvents(c, false)
			}
		}
		this.stopEvent(c);
		return true
	},
	fireEvents : function(l, m) {
		var o = this.dragCurrent;
		if (!o || o.isLocked()) {
			return
		}
		var p = l.getPoint();
		var a = [];
		var d = [];
		var j = [];
		var g = [];
		var c = [];
		for (var f in this.dragOvers) {
			var b = this.dragOvers[f];
			if (!this.isTypeOfDD(b)) {
				continue
			}
			if (!this.isOverTarget(p, b, this.mode)) {
				d.push(b)
			}
			a[f] = true;
			delete this.dragOvers[f]
		}
		for (var n in o.groups) {
			if ("string" != typeof n) {
				continue
			}
			for (f in this.ids[n]) {
				var h = this.ids[n][f];
				if (!this.isTypeOfDD(h)) {
					continue
				}
				if (h.isTarget && !h.isLocked()
						&& ((h != o) || (o.ignoreSelf === false))) {
					if (this.isOverTarget(p, h, this.mode)) {
						if (m) {
							g.push(h)
						} else {
							if (!a[h.id]) {
								c.push(h)
							} else {
								j.push(h)
							}
							this.dragOvers[h.id] = h
						}
					}
				}
			}
		}
		if (this.mode) {
			if (d.length) {
				o.b4DragOut(l, d);
				o.onDragOut(l, d)
			}
			if (c.length) {
				o.onDragEnter(l, c)
			}
			if (j.length) {
				o.b4DragOver(l, j);
				o.onDragOver(l, j)
			}
			if (g.length) {
				o.b4DragDrop(l, g);
				o.onDragDrop(l, g)
			}
		} else {
			var k = 0;
			for (f = 0, k = d.length; f < k; ++f) {
				o.b4DragOut(l, d[f].id);
				o.onDragOut(l, d[f].id)
			}
			for (f = 0, k = c.length; f < k; ++f) {
				o.onDragEnter(l, c[f].id)
			}
			for (f = 0, k = j.length; f < k; ++f) {
				o.b4DragOver(l, j[f].id);
				o.onDragOver(l, j[f].id)
			}
			for (f = 0, k = g.length; f < k; ++f) {
				o.b4DragDrop(l, g[f].id);
				o.onDragDrop(l, g[f].id)
			}
		}
		if (m && !g.length) {
			o.onInvalidDrop(l)
		}
	},
	getBestMatch : function(c) {
		var e = null;
		var b = c.length;
		if (b == 1) {
			e = c[0]
		} else {
			for (var d = 0; d < b; ++d) {
				var a = c[d];
				if (a.cursorIsOver) {
					e = a;
					break
				} else {
					if (!e || e.overlap.getArea() < a.overlap.getArea()) {
						e = a
					}
				}
			}
		}
		return e
	},
	refreshCache : function(b) {
		for (var a in b) {
			if ("string" != typeof a) {
				continue
			}
			for (var c in this.ids[a]) {
				var d = this.ids[a][c];
				if (this.isTypeOfDD(d)) {
					var e = this.getLocation(d);
					if (e) {
						this.locationCache[d.id] = e
					} else {
						delete this.locationCache[d.id]
					}
				}
			}
		}
	},
	verifyEl : function(b) {
		if (b) {
			var a;
			if (Ext.isIE) {
				try {
					a = b.offsetParent
				} catch (c) {
				}
			} else {
				a = b.offsetParent
			}
			if (a) {
				return true
			}
		}
		return false
	},
	getLocation : function(h) {
		if (!this.isTypeOfDD(h)) {
			return null
		}
		if (h.getRegion) {
			return h.getRegion()
		}
		var f = h.getEl(), k, d, c, n, m, o, a, j, g;
		try {
			k = Ext.core.Element.getXY(f)
		} catch (i) {
		}
		if (!k) {
			return null
		}
		d = k[0];
		c = d + f.offsetWidth;
		n = k[1];
		m = n + f.offsetHeight;
		o = n - h.padding[0];
		a = c + h.padding[1];
		j = m + h.padding[2];
		g = d - h.padding[3];
		return Ext.create("Ext.util.Region", o, a, j, g)
	},
	isOverTarget : function(i, a, c) {
		var e = this.locationCache[a.id];
		if (!e || !this.useCache) {
			e = this.getLocation(a);
			this.locationCache[a.id] = e
		}
		if (!e) {
			return false
		}
		a.cursorIsOver = e.contains(i);
		var h = this.dragCurrent;
		if (!h || !h.getTargetCoord || (!c && !h.constrainX && !h.constrainY)) {
			return a.cursorIsOver
		}
		a.overlap = null;
		var f = h.getTargetCoord(i.x, i.y);
		var b = h.getDragEl();
		var d = Ext.create("Ext.util.Region", f.y, f.x + b.offsetWidth, f.y
						+ b.offsetHeight, f.x);
		var g = d.intersect(e);
		if (g) {
			a.overlap = g;
			return (c) ? true : a.cursorIsOver
		} else {
			return false
		}
	},
	_onUnload : function(b, a) {
		Ext.dd.DragDropManager.unregAll()
	},
	unregAll : function() {
		if (this.dragCurrent) {
			this.stopDrag();
			this.dragCurrent = null
		}
		this._execOnAll("unreg", []);
		for (var a in this.elementCache) {
			delete this.elementCache[a]
		}
		this.elementCache = {};
		this.ids = {}
	},
	elementCache : {},
	getElWrapper : function(b) {
		var a = this.elementCache[b];
		if (!a || !a.el) {
			a = this.elementCache[b] = new this.ElementWrapper(Ext.getDom(b))
		}
		return a
	},
	getElement : function(a) {
		return Ext.getDom(a)
	},
	getCss : function(b) {
		var a = Ext.getDom(b);
		return (a) ? a.style : null
	},
	ElementWrapper : function(a) {
		this.el = a || null;
		this.id = this.el && a.id;
		this.css = this.el && a.style
	},
	getPosX : function(a) {
		return Ext.core.Element.getX(a)
	},
	getPosY : function(a) {
		return Ext.core.Element.getY(a)
	},
	swapNode : function(c, a) {
		if (c.swapNode) {
			c.swapNode(a)
		} else {
			var d = a.parentNode;
			var b = a.nextSibling;
			if (b == c) {
				d.insertBefore(c, a)
			} else {
				if (a == c.nextSibling) {
					d.insertBefore(a, c)
				} else {
					c.parentNode.replaceChild(a, c);
					d.insertBefore(c, b)
				}
			}
		}
	},
	getScroll : function() {
		var d = window.document, e = d.documentElement, a = d.body, c = 0, b = 0;
		if (Ext.isGecko4) {
			c = window.scrollYOffset;
			b = window.scrollXOffset
		} else {
			if (e && (e.scrollTop || e.scrollLeft)) {
				c = e.scrollTop;
				b = e.scrollLeft
			} else {
				if (a) {
					c = a.scrollTop;
					b = a.scrollLeft
				}
			}
		}
		return {
			top : c,
			left : b
		}
	},
	getStyle : function(b, a) {
		return Ext.fly(b).getStyle(a)
	},
	getScrollTop : function() {
		return this.getScroll().top
	},
	getScrollLeft : function() {
		return this.getScroll().left
	},
	moveToEl : function(a, c) {
		var b = Ext.core.Element.getXY(c);
		Ext.core.Element.setXY(a, b)
	},
	numericSort : function(d, c) {
		return (d - c)
	},
	_timeoutCount : 0,
	_addListeners : function() {
		if (document) {
			this._onLoad()
		} else {
			if (this._timeoutCount > 2000) {
			} else {
				setTimeout(this._addListeners, 10);
				if (document && document.body) {
					this._timeoutCount += 1
				}
			}
		}
	},
	handleWasClicked : function(a, c) {
		if (this.isHandle(c, a.id)) {
			return true
		} else {
			var b = a.parentNode;
			while (b) {
				if (this.isHandle(c, b.id)) {
					return true
				} else {
					b = b.parentNode
				}
			}
		}
		return false
	}
}, function() {
	this._addListeners()
});
Ext.define("Ext.data.Types", {
			singleton : true,
			requires : ["Ext.data.SortTypes"]
		}, function() {
			var a = Ext.data.SortTypes;
			Ext.apply(Ext.data.Types, {
				stripRe : /[\$,%]/g,
				AUTO : {
					convert : function(b) {
						return b
					},
					sortType : a.none,
					type : "auto"
				},
				STRING : {
					convert : function(c) {
						var b = this.useNull ? null : "";
						return (c === undefined || c === null) ? b : String(c)
					},
					sortType : a.asUCString,
					type : "string"
				},
				INT : {
					convert : function(b) {
						return b !== undefined && b !== null && b !== ""
								? parseInt(String(b).replace(
												Ext.data.Types.stripRe, ""), 10)
								: (this.useNull ? null : 0)
					},
					sortType : a.none,
					type : "int"
				},
				FLOAT : {
					convert : function(b) {
						return b !== undefined && b !== null && b !== ""
								? parseFloat(String(b).replace(
												Ext.data.Types.stripRe, ""), 10)
								: (this.useNull ? null : 0)
					},
					sortType : a.none,
					type : "float"
				},
				BOOL : {
					convert : function(b) {
						if (this.useNull && b === undefined || b === null
								|| b === "") {
							return null
						}
						return b === true || b === "true" || b == 1
					},
					sortType : a.none,
					type : "bool"
				},
				DATE : {
					convert : function(c) {
						var d = this.dateFormat;
						if (!c) {
							return null
						}
						if (Ext.isDate(c)) {
							return c
						}
						if (d) {
							if (d == "timestamp") {
								return new Date(c * 1000)
							}
							if (d == "time") {
								return new Date(parseInt(c, 10))
							}
							return Ext.Date.parse(c, d)
						}
						var b = Date.parse(c);
						return b ? new Date(b) : null
					},
					sortType : a.asDate,
					type : "date"
				}
			});
			Ext.apply(Ext.data.Types, {
						BOOLEAN : this.BOOL,
						INTEGER : this.INT,
						NUMBER : this.FLOAT
					})
		});
Ext.define("Ext.data.Field", {
			requires : ["Ext.data.Types", "Ext.data.SortTypes"],
			alias : "data.field",
			constructor : function(b) {
				if (Ext.isString(b)) {
					b = {
						name : b
					}
				}
				Ext.apply(this, b);
				var d = Ext.data.Types, a = this.sortType, c;
				if (this.type) {
					if (Ext.isString(this.type)) {
						this.type = d[this.type.toUpperCase()] || d.AUTO
					}
				} else {
					this.type = d.AUTO
				}
				if (Ext.isString(a)) {
					this.sortType = Ext.data.SortTypes[a]
				} else {
					if (Ext.isEmpty(a)) {
						this.sortType = this.type.sortType
					}
				}
				if (!this.convert) {
					this.convert = this.type.convert
				}
			},
			dateFormat : null,
			useNull : false,
			defaultValue : "",
			mapping : null,
			sortType : null,
			sortDir : "ASC",
			allowBlank : true,
			persist : true
		});
Ext.define("Ext.data.NodeInterface", {
	requires : ["Ext.data.Field"],
	statics : {
		decorate : function(f) {
			if (!f.isNode) {
				var n = Ext.ModelManager, g = f.modelName, l = n.getModel(g), o = l.prototype.idProperty, a = Ext.Array
						.filter(n.all.getArray(), function(i) {
									return i.modelName == g
								}), e = a.length, h = [], d, m, k, c, b;
				l.override(this.getPrototypeBody());
				h = this.applyFields(l, [{
									name : o,
									type : "string",
									defaultValue : null
								}, {
									name : "parentId",
									type : "string",
									defaultValue : null
								}, {
									name : "index",
									type : "int",
									defaultValue : null
								}, {
									name : "depth",
									type : "int",
									defaultValue : 0
								}, {
									name : "expanded",
									type : "bool",
									defaultValue : false,
									persist : false
								}, {
									name : "checked",
									type : "auto",
									defaultValue : null
								}, {
									name : "leaf",
									type : "bool",
									defaultValue : false,
									persist : false
								}, {
									name : "cls",
									type : "string",
									defaultValue : null,
									persist : false
								}, {
									name : "iconCls",
									type : "string",
									defaultValue : null,
									persist : false
								}, {
									name : "root",
									type : "boolean",
									defaultValue : false,
									persist : false
								}, {
									name : "isLast",
									type : "boolean",
									defaultValue : false,
									persist : false
								}, {
									name : "isFirst",
									type : "boolean",
									defaultValue : false,
									persist : false
								}, {
									name : "allowDrop",
									type : "boolean",
									defaultValue : true,
									persist : false
								}, {
									name : "allowDrag",
									type : "boolean",
									defaultValue : true,
									persist : false
								}, {
									name : "loaded",
									type : "boolean",
									defaultValue : false,
									persist : false
								}, {
									name : "loading",
									type : "boolean",
									defaultValue : false,
									persist : false
								}, {
									name : "href",
									type : "string",
									defaultValue : null,
									persist : false
								}, {
									name : "hrefTarget",
									type : "string",
									defaultValue : null,
									persist : false
								}, {
									name : "qtip",
									type : "string",
									defaultValue : null,
									persist : false
								}, {
									name : "qtitle",
									type : "string",
									defaultValue : null,
									persist : false
								}]);
				k = h.length;
				for (d = 0; d < e; d++) {
					m = a[d];
					for (c = 0; c < k; c++) {
						b = h[c];
						if (m.get(b.name) === undefined) {
							m.data[b.name] = b.defaultValue
						}
					}
				}
			}
			Ext.applyIf(f, {
						firstChild : null,
						lastChild : null,
						parentNode : null,
						previousSibling : null,
						nextSibling : null,
						childNodes : []
					});
			f.commit(true);
			f.enableBubble(["append", "remove", "move", "insert",
					"beforeappend", "beforeremove", "beforemove",
					"beforeinsert", "expand", "collapse", "beforeexpand",
					"beforecollapse", "sort"]);
			return f
		},
		applyFields : function(h, j) {
			var c = h.prototype, e = c.fields, k = e.keys, g = j.length, b, d, a, f = [];
			for (d = 0; d < g; d++) {
				b = j[d];
				if (!Ext.Array.contains(k, b.name)) {
					b = Ext.create("data.field", b);
					f.push(b);
					e.add(b)
				}
			}
			return f
		},
		getPrototypeBody : function() {
			return {
				isNode : true,
				createNode : function(a) {
					if (Ext.isObject(a) && !a.isModel) {
						a = Ext.ModelManager.create(a, this.modelName)
					}
					return Ext.data.NodeInterface.decorate(a)
				},
				isLeaf : function() {
					return this.get("leaf") === true
				},
				setFirstChild : function(a) {
					this.firstChild = a
				},
				setLastChild : function(a) {
					this.lastChild = a
				},
				updateInfo : function(j) {
					var k = this, b = k.isRoot(), g = k.parentNode, c = (!g
							? true
							: g.firstChild == k), f = (!g
							? true
							: g.lastChild == k), e = 0, l = k, a = k.childNodes, h = a.length, d = 0;
					while (l.parentNode) {
						++e;
						l = l.parentNode
					}
					k.beginEdit();
					k.set({
								isFirst : c,
								isLast : f,
								depth : e,
								index : g ? g.indexOf(k) : 0,
								parentId : g ? g.getId() : null
							});
					k.endEdit(j);
					if (j) {
						k.commit()
					}
					for (d = 0; d < h; d++) {
						a[d].updateInfo(j)
					}
				},
				isLast : function() {
					return this.get("isLast")
				},
				isFirst : function() {
					return this.get("isFirst")
				},
				hasChildNodes : function() {
					return !this.isLeaf() && this.childNodes.length > 0
				},
				isExpandable : function() {
					return this.get("expandable") || this.hasChildNodes()
				},
				appendChild : function(b, j, h) {
					var f = this, c, e, d, g, a;
					if (Ext.isArray(b)) {
						for (c = 0, e = b.length; c < e; c++) {
							f.appendChild(b[c])
						}
					} else {
						b = f.createNode(b);
						if (j !== true
								&& f.fireEvent("beforeappend", f, b) === false) {
							return false
						}
						d = f.childNodes.length;
						g = b.parentNode;
						if (g) {
							if (j !== true
									&& b.fireEvent("beforemove", b, g, f, d) === false) {
								return false
							}
							g.removeChild(b, null, false, true)
						}
						d = f.childNodes.length;
						if (d === 0) {
							f.setFirstChild(b)
						}
						f.childNodes.push(b);
						b.parentNode = f;
						b.nextSibling = null;
						f.setLastChild(b);
						a = f.childNodes[d - 1];
						if (a) {
							b.previousSibling = a;
							a.nextSibling = b;
							a.updateInfo(h)
						} else {
							b.previousSibling = null
						}
						b.updateInfo(h);
						if (!f.isLoaded()) {
							f.set("loaded", true)
						} else {
							if (f.childNodes.length === 1) {
								f.set("loaded", f.isLoaded())
							}
						}
						if (j !== true) {
							f.fireEvent("append", f, b, d);
							if (g) {
								b.fireEvent("move", b, g, f, d)
							}
						}
						return b
					}
				},
				getBubbleTarget : function() {
					return this.parentNode
				},
				removeChild : function(e, b, c, f) {
					var d = this, a = d.indexOf(e);
					if (a == -1
							|| (c !== true && d.fireEvent("beforeremove", d, e) === false)) {
						return false
					}
					d.childNodes.splice(a, 1);
					if (d.firstChild == e) {
						d.setFirstChild(e.nextSibling)
					}
					if (d.lastChild == e) {
						d.setLastChild(e.previousSibling)
					}
					if (e.previousSibling) {
						e.previousSibling.nextSibling = e.nextSibling;
						e.previousSibling.updateInfo(f)
					}
					if (e.nextSibling) {
						e.nextSibling.previousSibling = e.previousSibling;
						e.nextSibling.updateInfo(f)
					}
					if (c !== true) {
						d.fireEvent("remove", d, e)
					}
					if (!d.childNodes.length) {
						d.set("loaded", d.isLoaded())
					}
					if (b) {
						e.destroy(true)
					} else {
						e.clear()
					}
					return e
				},
				copy : function(d, c) {
					var f = this, b = f.callOverridden(arguments), a = f.childNodes
							? f.childNodes.length
							: 0, e;
					if (c) {
						for (e = 0; e < a; e++) {
							b.appendChild(f.childNodes[e].copy(true))
						}
					}
					return b
				},
				clear : function(a) {
					var b = this;
					b.parentNode = b.previousSibling = b.nextSibling = null;
					if (a) {
						b.firstChild = b.lastChild = null
					}
				},
				destroy : function(a) {
					var b = this;
					if (a === true) {
						b.clear(true);
						Ext.each(b.childNodes, function(c) {
									c.destroy(true)
								});
						b.childNodes = null
					} else {
						b.remove(true)
					}
					b.callOverridden()
				},
				insertBefore : function(f, a, d) {
					var e = this, b = e.indexOf(a), c = f.parentNode, g = b, h;
					if (!a) {
						return e.appendChild(f)
					}
					if (f == a) {
						return false
					}
					f = e.createNode(f);
					if (d !== true
							&& e.fireEvent("beforeinsert", e, f, a) === false) {
						return false
					}
					if (c == e && e.indexOf(f) < b) {
						g--
					}
					if (c) {
						if (d !== true
								&& f.fireEvent("beforemove", f, c, e, b, a) === false) {
							return false
						}
						c.removeChild(f)
					}
					if (g === 0) {
						e.setFirstChild(f)
					}
					e.childNodes.splice(g, 0, f);
					f.parentNode = e;
					f.nextSibling = a;
					a.previousSibling = f;
					h = e.childNodes[g - 1];
					if (h) {
						f.previousSibling = h;
						h.nextSibling = f;
						h.updateInfo()
					} else {
						f.previousSibling = null
					}
					f.updateInfo();
					if (!e.isLoaded()) {
						e.set("loaded", true)
					} else {
						if (e.childNodes.length === 1) {
							e.set("loaded", e.isLoaded())
						}
					}
					if (d !== true) {
						e.fireEvent("insert", e, f, a);
						if (c) {
							f.fireEvent("move", f, c, e, g, a)
						}
					}
					return f
				},
				insertChild : function(a, c) {
					var b = this.childNodes[a];
					if (b) {
						return this.insertBefore(c, b)
					} else {
						return this.appendChild(c)
					}
				},
				remove : function(b, c) {
					var a = this.parentNode;
					if (a) {
						a.removeChild(this, b, c, true)
					}
					return this
				},
				removeAll : function(a, b) {
					var d = this.childNodes, c;
					while ((c = d[0])) {
						this.removeChild(c, a, b)
					}
					return this
				},
				getChildAt : function(a) {
					return this.childNodes[a]
				},
				replaceChild : function(a, d, c) {
					var b = d ? d.nextSibling : null;
					this.removeChild(d, c);
					this.insertBefore(a, b, c);
					return d
				},
				indexOf : function(a) {
					return Ext.Array.indexOf(this.childNodes, a)
				},
				getDepth : function() {
					return this.get("depth")
				},
				bubble : function(c, b, a) {
					var d = this;
					while (d) {
						if (c.apply(b || d, a || [d]) === false) {
							break
						}
						d = d.parentNode
					}
				},
				cascade : function() {
					if (Ext.isDefined(Ext.global.console)) {
						Ext.global.console
								.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")
					}
					return this.cascadeBy.apply(this, arguments)
				},
				cascadeBy : function(d, c, a) {
					if (d.apply(c || this, a || [this]) !== false) {
						var f = this.childNodes, e = f.length, b;
						for (b = 0; b < e; b++) {
							f[b].cascadeBy(d, c, a)
						}
					}
				},
				eachChild : function(d, c, a) {
					var f = this.childNodes, e = f.length, b;
					for (b = 0; b < e; b++) {
						if (d.apply(c || this, a || [f[b]]) === false) {
							break
						}
					}
				},
				findChild : function(b, c, a) {
					return this.findChildBy(function() {
								return this.get(b) == c
							}, null, a)
				},
				findChildBy : function(g, f, b) {
					var e = this.childNodes, a = e.length, d = 0, h, c;
					for (; d < a; d++) {
						h = e[d];
						if (g.call(f || h, h) === true) {
							return h
						} else {
							if (b) {
								c = h.findChildBy(g, f, b);
								if (c !== null) {
									return c
								}
							}
						}
					}
					return null
				},
				contains : function(a) {
					return a.isAncestor(this)
				},
				isAncestor : function(a) {
					var b = this.parentNode;
					while (b) {
						if (b == a) {
							return true
						}
						b = b.parentNode
					}
					return false
				},
				sort : function(f, b, a) {
					var d = this.childNodes, e = d.length, c, g;
					if (e > 0) {
						Ext.Array.sort(d, f);
						for (c = 0; c < e; c++) {
							g = d[c];
							g.previousSibling = d[c - 1];
							g.nextSibling = d[c + 1];
							if (c === 0) {
								this.setFirstChild(g);
								g.updateInfo()
							}
							if (c == e - 1) {
								this.setLastChild(g);
								g.updateInfo()
							}
							if (b && !g.isLeaf()) {
								g.sort(f, true, true)
							}
						}
						if (a !== true) {
							this.fireEvent("sort", this, d)
						}
					}
				},
				isExpanded : function() {
					return this.get("expanded")
				},
				isLoaded : function() {
					return this.get("loaded")
				},
				isLoading : function() {
					return this.get("loading")
				},
				isRoot : function() {
					return !this.parentNode
				},
				isVisible : function() {
					var a = this.parentNode;
					while (a) {
						if (!a.isExpanded()) {
							return false
						}
						a = a.parentNode
					}
					return true
				},
				expand : function(a, d, b) {
					var c = this;
					if (!c.isLeaf()) {
						if (!c.isLoading() && !c.isExpanded()) {
							c.fireEvent("beforeexpand", c, function(e) {
										c.set("expanded", true);
										c.fireEvent("expand", c, c.childNodes,
												false);
										if (a) {
											c.expandChildren(true, d, b)
										} else {
											Ext.callback(d, b || c,
													[c.childNodes])
										}
									}, c)
						} else {
							if (a) {
								c.expandChildren(true, d, b)
							} else {
								Ext.callback(d, b || c, [c.childNodes])
							}
						}
					} else {
						Ext.callback(d, b || c)
					}
				},
				expandChildren : function(d, h, j) {
					var g = this, e = 0, a = g.childNodes, f = a.length, c, b = 0;
					for (; e < f; ++e) {
						c = a[e];
						if (!c.isLeaf() && !c.isExpanded()) {
							b++;
							a[e].expand(d, function() {
										b--;
										if (h && !b) {
											Ext.callback(h, j || g,
													g.childNodes)
										}
									})
						}
					}
					if (!b && h) {
						Ext.callback(h, j || g, g.childNodes)
					}
				},
				collapse : function(a, d, b) {
					var c = this;
					if (!c.isLeaf()) {
						if (!c.collapsing && c.isExpanded()) {
							c.fireEvent("beforecollapse", c, function(e) {
								c.set("expanded", false);
								c.fireEvent("collapse", c, c.childNodes, false);
								if (a) {
									c.collapseChildren(true, d, b)
								} else {
									Ext.callback(d, b || c, [c.childNodes])
								}
							}, c)
						} else {
							if (a) {
								c.collapseChildren(true, d, b)
							}
						}
					} else {
						Ext.callback(d, b || c, c.childNodes)
					}
				},
				collapseChildren : function(d, h, j) {
					var g = this, e = 0, b = g.childNodes, f = b.length, c, a = 0;
					for (; e < f; ++e) {
						c = b[e];
						if (!c.isLeaf() && c.isExpanded()) {
							a++;
							b[e].collapse(d, function() {
										a--;
										if (h && !a) {
											Ext.callback(h, j || g,
													g.childNodes)
										}
									})
						}
					}
					if (!a && h) {
						Ext.callback(h, j || g, g.childNodes)
					}
				}
			}
		}
	}
});
Ext.define("Ext.Ajax", {
			extend : "Ext.data.Connection",
			singleton : true,
			autoAbort : false
		});
Ext.define("Ext.util.AbstractMixedCollection", {
	requires : ["Ext.util.Filter"],
	mixins : {
		observable : "Ext.util.Observable"
	},
	constructor : function(b, a) {
		var c = this;
		c.items = [];
		c.map = {};
		c.keys = [];
		c.length = 0;
		c.addEvents("clear", "add", "replace", "remove");
		c.allowFunctions = b === true;
		if (a) {
			c.getKey = a
		}
		c.mixins.observable.constructor.call(c)
	},
	allowFunctions : false,
	add : function(b, e) {
		var d = this, f = e, c = b, a;
		if (arguments.length == 1) {
			f = c;
			c = d.getKey(f)
		}
		if (typeof c != "undefined" && c !== null) {
			a = d.map[c];
			if (typeof a != "undefined") {
				return d.replace(c, f)
			}
			d.map[c] = f
		}
		d.length++;
		d.items.push(f);
		d.keys.push(c);
		d.fireEvent("add", d.length - 1, f, c);
		return f
	},
	getKey : function(a) {
		return a.id
	},
	replace : function(c, e) {
		var d = this, a, b;
		if (arguments.length == 1) {
			e = arguments[0];
			c = d.getKey(e)
		}
		a = d.map[c];
		if (typeof c == "undefined" || c === null || typeof a == "undefined") {
			return d.add(c, e)
		}
		b = d.indexOfKey(c);
		d.items[b] = e;
		d.map[c] = e;
		d.fireEvent("replace", c, a, e);
		return e
	},
	addAll : function(f) {
		var e = this, d = 0, b, a, c;
		if (arguments.length > 1 || Ext.isArray(f)) {
			b = arguments.length > 1 ? arguments : f;
			for (a = b.length; d < a; d++) {
				e.add(b[d])
			}
		} else {
			for (c in f) {
				if (f.hasOwnProperty(c)) {
					if (e.allowFunctions || typeof f[c] != "function") {
						e.add(c, f[c])
					}
				}
			}
		}
	},
	each : function(e, d) {
		var b = [].concat(this.items), c = 0, a = b.length, f;
		for (; c < a; c++) {
			f = b[c];
			if (e.call(d || f, f, c, a) === false) {
				break
			}
		}
	},
	eachKey : function(e, d) {
		var f = this.keys, b = this.items, c = 0, a = f.length;
		for (; c < a; c++) {
			e.call(d || window, f[c], b[c], c, a)
		}
	},
	findBy : function(e, d) {
		var f = this.keys, b = this.items, c = 0, a = b.length;
		for (; c < a; c++) {
			if (e.call(d || window, b[c], f[c])) {
				return b[c]
			}
		}
		return null
	},
	find : function() {
		if (Ext.isDefined(Ext.global.console)) {
			Ext.global.console
					.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")
		}
		return this.findBy.apply(this, arguments)
	},
	insert : function(a, b, e) {
		var d = this, c = b, f = e;
		if (arguments.length == 2) {
			f = c;
			c = d.getKey(f)
		}
		if (d.containsKey(c)) {
			d.suspendEvents();
			d.removeAtKey(c);
			d.resumeEvents()
		}
		if (a >= d.length) {
			return d.add(c, f)
		}
		d.length++;
		d.items.splice(a, 0, f);
		if (typeof c != "undefined" && c !== null) {
			d.map[c] = f
		}
		d.keys.splice(a, 0, c);
		d.fireEvent("add", a, f, c);
		return f
	},
	remove : function(a) {
		return this.removeAt(this.indexOf(a))
	},
	removeAll : function(a) {
		Ext.each(a || [], function(b) {
					this.remove(b)
				}, this);
		return this
	},
	removeAt : function(a) {
		var c = this, d, b;
		if (a < c.length && a >= 0) {
			c.length--;
			d = c.items[a];
			c.items.splice(a, 1);
			b = c.keys[a];
			if (typeof b != "undefined") {
				delete c.map[b]
			}
			c.keys.splice(a, 1);
			c.fireEvent("remove", d, b);
			return d
		}
		return false
	},
	removeAtKey : function(a) {
		return this.removeAt(this.indexOfKey(a))
	},
	getCount : function() {
		return this.length
	},
	indexOf : function(a) {
		return Ext.Array.indexOf(this.items, a)
	},
	indexOfKey : function(a) {
		return Ext.Array.indexOf(this.keys, a)
	},
	get : function(b) {
		var d = this, a = d.map[b], c = a !== undefined
				? a
				: (typeof b == "number") ? d.items[b] : undefined;
		return typeof c != "function" || d.allowFunctions ? c : null
	},
	getAt : function(a) {
		return this.items[a]
	},
	getByKey : function(a) {
		return this.map[a]
	},
	contains : function(a) {
		return Ext.Array.contains(this.items, a)
	},
	containsKey : function(a) {
		return typeof this.map[a] != "undefined"
	},
	clear : function() {
		var a = this;
		a.length = 0;
		a.items = [];
		a.keys = [];
		a.map = {};
		a.fireEvent("clear")
	},
	first : function() {
		return this.items[0]
	},
	last : function() {
		return this.items[this.length - 1]
	},
	sum : function(g, b, h, a) {
		var c = this.extractValues(g, b), f = c.length, e = 0, d;
		h = h || 0;
		a = (a || a === 0) ? a : f - 1;
		for (d = h; d <= a; d++) {
			e += c[d]
		}
		return e
	},
	collect : function(j, e, g) {
		var k = this.extractValues(j, e), a = k.length, b = {}, c = [], h, f, d;
		for (d = 0; d < a; d++) {
			h = k[d];
			f = String(h);
			if ((g || !Ext.isEmpty(h)) && !b[f]) {
				b[f] = true;
				c.push(h)
			}
		}
		return c
	},
	extractValues : function(c, a) {
		var b = this.items;
		if (a) {
			b = Ext.Array.pluck(b, a)
		}
		return Ext.Array.pluck(b, c)
	},
	getRange : function(f, a) {
		var e = this, c = e.items, b = [], d;
		if (c.length < 1) {
			return b
		}
		f = f || 0;
		a = Math.min(typeof a == "undefined" ? e.length - 1 : a, e.length - 1);
		if (f <= a) {
			for (d = f; d <= a; d++) {
				b[b.length] = c[d]
			}
		} else {
			for (d = f; d >= a; d--) {
				b[b.length] = c[d]
			}
		}
		return b
	},
	filter : function(d, c, f, a) {
		var b = [], e;
		if (Ext.isString(d)) {
			b.push(Ext.create("Ext.util.Filter", {
						property : d,
						value : c,
						anyMatch : f,
						caseSensitive : a
					}))
		} else {
			if (Ext.isArray(d) || d instanceof Ext.util.Filter) {
				b = b.concat(d)
			}
		}
		e = function(g) {
			var m = true, n = b.length, h;
			for (h = 0; h < n; h++) {
				var l = b[h], k = l.filterFn, j = l.scope;
				m = m && k.call(j, g)
			}
			return m
		};
		return this.filterBy(e)
	},
	filterBy : function(e, d) {
		var h = this, a = new this.self(), g = h.keys, b = h.items, f = b.length, c;
		a.getKey = h.getKey;
		for (c = 0; c < f; c++) {
			if (e.call(d || h, b[c], g[c])) {
				a.add(g[c], b[c])
			}
		}
		return a
	},
	findIndex : function(c, b, e, d, a) {
		if (Ext.isEmpty(b, false)) {
			return -1
		}
		b = this.createValueMatcher(b, d, a);
		return this.findIndexBy(function(f) {
					return f && b.test(f[c])
				}, null, e)
	},
	findIndexBy : function(e, d, h) {
		var g = this, f = g.keys, b = g.items, c = h || 0, a = b.length;
		for (; c < a; c++) {
			if (e.call(d || g, b[c], f[c])) {
				return c
			}
		}
		return -1
	},
	createValueMatcher : function(c, e, a, b) {
		if (!c.exec) {
			var d = Ext.String.escapeRegex;
			c = String(c);
			if (e === true) {
				c = d(c)
			} else {
				c = "^" + d(c);
				if (b === true) {
					c += "$"
				}
			}
			c = new RegExp(c, a ? "" : "i")
		}
		return c
	},
	clone : function() {
		var e = this, f = new this.self(), d = e.keys, b = e.items, c = 0, a = b.length;
		for (; c < a; c++) {
			f.add(d[c], b[c])
		}
		f.getKey = e.getKey;
		return f
	}
});
Ext.define("Ext.util.Sortable", {
			isSortable : true,
			defaultSortDirection : "ASC",
			requires : ["Ext.util.Sorter"],
			sortRoot : null,
			initSortable : function() {
				var a = this, b = a.sorters;
				a.sorters = Ext.create("Ext.util.AbstractMixedCollection",
						false, function(c) {
							return c.id || c.property
						});
				if (b) {
					a.sorters.addAll(a.decodeSorters(b))
				}
			},
			sort : function(g, f, c, e) {
				var d = this, h, b, a;
				if (Ext.isArray(g)) {
					e = c;
					c = f;
					a = g
				} else {
					if (Ext.isObject(g)) {
						e = c;
						c = f;
						a = [g]
					} else {
						if (Ext.isString(g)) {
							h = d.sorters.get(g);
							if (!h) {
								h = {
									property : g,
									direction : f
								};
								a = [h]
							} else {
								if (f === undefined) {
									h.toggle()
								} else {
									h.setDirection(f)
								}
							}
						}
					}
				}
				if (a && a.length) {
					a = d.decodeSorters(a);
					if (Ext.isString(c)) {
						if (c === "prepend") {
							g = d.sorters.clone().items;
							d.sorters.clear();
							d.sorters.addAll(a);
							d.sorters.addAll(g)
						} else {
							d.sorters.addAll(a)
						}
					} else {
						d.sorters.clear();
						d.sorters.addAll(a)
					}
					if (e !== false) {
						d.onBeforeSort(a)
					}
				}
				if (e !== false) {
					g = d.sorters.items;
					if (g.length) {
						b = function(l, k) {
							var j = g[0].sort(l, k), n = g.length, m;
							for (m = 1; m < n; m++) {
								j = j || g[m].sort.call(this, l, k)
							}
							return j
						};
						d.doSort(b)
					}
				}
				return g
			},
			onBeforeSort : Ext.emptyFn,
			decodeSorters : function(f) {
				if (!Ext.isArray(f)) {
					if (f === undefined) {
						f = []
					} else {
						f = [f]
					}
				}
				var d = f.length, g = Ext.util.Sorter, a = this.model
						? this.model.prototype.fields
						: null, e, b, c;
				for (c = 0; c < d; c++) {
					b = f[c];
					if (!(b instanceof g)) {
						if (Ext.isString(b)) {
							b = {
								property : b
							}
						}
						Ext.applyIf(b, {
									root : this.sortRoot,
									direction : "ASC"
								});
						if (b.fn) {
							b.sorterFn = b.fn
						}
						if (typeof b == "function") {
							b = {
								sorterFn : b
							}
						}
						if (a && !b.transform) {
							e = a.get(b.property);
							b.transform = e ? e.sortType : undefined
						}
						f[c] = Ext.create("Ext.util.Sorter", b)
					}
				}
				return f
			},
			getSorters : function() {
				return this.sorters.items
			},
			getSortState : function() {
				return this.sortInfo
			}
		});
Ext.define("Ext.util.MixedCollection", {
	extend : "Ext.util.AbstractMixedCollection",
	mixins : {
		sortable : "Ext.util.Sortable"
	},
	constructor : function() {
		var a = this;
		a.callParent(arguments);
		a.addEvents("sort");
		a.mixins.sortable.initSortable.call(a)
	},
	doSort : function(a) {
		this.sortBy(a)
	},
	_sort : function(k, a, j) {
		var h = this, d, e, b = String(a).toUpperCase() == "DESC" ? -1 : 1, g = [], l = h.keys, f = h.items;
		j = j || function(i, c) {
			return i - c
		};
		for (d = 0, e = f.length; d < e; d++) {
			g[g.length] = {
				key : l[d],
				value : f[d],
				index : d
			}
		}
		Ext.Array.sort(g, function(i, c) {
					var m = j(i[k], c[k]) * b;
					if (m === 0) {
						m = (i.index < c.index ? -1 : 1)
					}
					return m
				});
		for (d = 0, e = g.length; d < e; d++) {
			f[d] = g[d].value;
			l[d] = g[d].key
		}
		h.fireEvent("sort", h)
	},
	sortBy : function(c) {
		var g = this, b = g.items, f = g.keys, e = b.length, a = [], d;
		for (d = 0; d < e; d++) {
			a[d] = {
				key : f[d],
				value : b[d],
				index : d
			}
		}
		Ext.Array.sort(a, function(i, h) {
					var j = c(i.value, h.value);
					if (j === 0) {
						j = (i.index < h.index ? -1 : 1)
					}
					return j
				});
		for (d = 0; d < e; d++) {
			b[d] = a[d].value;
			f[d] = a[d].key
		}
		g.fireEvent("sort", g, b, f)
	},
	reorder : function(d) {
		var g = this, b = g.items, c = 0, f = b.length, a = [], e = [], h;
		g.suspendEvents();
		for (h in d) {
			a[d[h]] = b[h]
		}
		for (c = 0; c < f; c++) {
			if (d[c] == undefined) {
				e.push(b[c])
			}
		}
		for (c = 0; c < f; c++) {
			if (a[c] == undefined) {
				a[c] = e.shift()
			}
		}
		g.clear();
		g.addAll(a);
		g.resumeEvents();
		g.fireEvent("sort", g)
	},
	sortByKey : function(a, b) {
		this._sort("key", a, b || function(d, c) {
					var f = String(d).toUpperCase(), e = String(c)
							.toUpperCase();
					return f > e ? 1 : (f < e ? -1 : 0)
				})
	}
});
Ext.define("Ext.menu.Manager", {
	singleton : true,
	requires : ["Ext.util.MixedCollection", "Ext.util.KeyMap"],
	alternateClassName : "Ext.menu.MenuMgr",
	uses : ["Ext.menu.Menu"],
	menus : {},
	groups : {},
	attached : false,
	lastShow : new Date(),
	init : function() {
		var a = this;
		a.active = Ext.create("Ext.util.MixedCollection");
		Ext.getDoc().addKeyListener(27, function() {
					if (a.active.length > 0) {
						a.hideAll()
					}
				}, a)
	},
	hideAll : function() {
		var a = this.active, b;
		if (a && a.length > 0) {
			b = a.clone();
			b.each(function(c) {
						c.hide()
					});
			return true
		}
		return false
	},
	onHide : function(a) {
		var b = this, c = b.active;
		c.remove(a);
		if (c.length < 1) {
			Ext.getDoc().un("mousedown", b.onMouseDown, b);
			b.attached = false
		}
	},
	onShow : function(a) {
		var e = this, f = e.active, d = f.last(), c = e.attached, b = a.getEl(), g;
		e.lastShow = new Date();
		f.add(a);
		if (!c) {
			Ext.getDoc().on("mousedown", e.onMouseDown, e);
			e.attached = true
		}
		a.toFront()
	},
	onBeforeHide : function(a) {
		if (a.activeChild) {
			a.activeChild.hide()
		}
		if (a.autoHideTimer) {
			clearTimeout(a.autoHideTimer);
			delete a.autoHideTimer
		}
	},
	onBeforeShow : function(a) {
		var c = this.active, b = a.parentMenu;
		c.remove(a);
		if (!b && !a.allowOtherMenus) {
			this.hideAll()
		} else {
			if (b && b.activeChild && a != b.activeChild) {
				b.activeChild.hide()
			}
		}
	},
	onMouseDown : function(d) {
		var b = this, c = b.active, a = b.lastShow;
		if (Ext.Date.getElapsed(a) > 50 && c.length > 0
				&& !d.getTarget("." + Ext.baseCSSPrefix + "menu")) {
			b.hideAll()
		}
	},
	register : function(b) {
		var a = this;
		if (!a.active) {
			a.init()
		}
		if (b.floating) {
			a.menus[b.id] = b;
			b.on({
						beforehide : a.onBeforeHide,
						hide : a.onHide,
						beforeshow : a.onBeforeShow,
						show : a.onShow,
						scope : a
					})
		}
	},
	get : function(b) {
		var a = this.menus;
		if (typeof b == "string") {
			if (!a) {
				return null
			}
			return a[b]
		} else {
			if (b.isMenu) {
				return b
			} else {
				if (Ext.isArray(b)) {
					return Ext.create("Ext.menu.Menu", {
								items : b
							})
				} else {
					return Ext.ComponentManager.create(b, "menu")
				}
			}
		}
	},
	unregister : function(d) {
		var a = this, b = a.menus, c = a.active;
		delete b[d.id];
		c.remove(d);
		d.un({
					beforehide : a.onBeforeHide,
					hide : a.onHide,
					beforeshow : a.onBeforeShow,
					show : a.onShow,
					scope : a
				})
	},
	registerCheckable : function(c) {
		var a = this.groups, b = c.group;
		if (b) {
			if (!a[b]) {
				a[b] = []
			}
			a[b].push(c)
		}
	},
	unregisterCheckable : function(c) {
		var a = this.groups, b = c.group;
		if (b) {
			Ext.Array.remove(a[b], c)
		}
	},
	onCheckChange : function(d, f) {
		var a = this.groups, c = d.group, b = 0, h, e, g;
		if (c && f) {
			h = a[c];
			e = h.length;
			for (; b < e; b++) {
				g = h[b];
				if (g != d) {
					g.setChecked(false)
				}
			}
		}
	}
});
Ext.define("Ext.data.Errors", {
			extend : "Ext.util.MixedCollection",
			isValid : function() {
				return this.length === 0
			},
			getByField : function(e) {
				var d = [], a, c, b;
				for (b = 0; b < this.length; b++) {
					a = this.items[b];
					if (a.field == e) {
						d.push(a)
					}
				}
				return d
			}
		});
Ext.define("Ext.data.StoreManager", {
			extend : "Ext.util.MixedCollection",
			alternateClassName : ["Ext.StoreMgr", "Ext.data.StoreMgr",
					"Ext.StoreManager"],
			singleton : true,
			uses : ["Ext.data.ArrayStore"],
			register : function() {
				for (var a = 0, b; (b = arguments[a]); a++) {
					this.add(b)
				}
			},
			unregister : function() {
				for (var a = 0, b; (b = arguments[a]); a++) {
					this.remove(this.lookup(b))
				}
			},
			lookup : function(c) {
				if (Ext.isArray(c)) {
					var b = ["field1"], e = !Ext.isArray(c[0]), f = c, d, a;
					if (e) {
						f = [];
						for (d = 0, a = c.length; d < a; ++d) {
							f.push([c[d]])
						}
					} else {
						for (d = 2, a = c[0].length; d <= a; ++d) {
							b.push("field" + d)
						}
					}
					return Ext.create("Ext.data.ArrayStore", {
								data : f,
								fields : b,
								autoDestroy : true,
								autoCreated : true,
								expanded : e
							})
				}
				if (Ext.isString(c)) {
					return this.get(c)
				} else {
					return Ext.data.AbstractStore.create(c)
				}
			},
			getKey : function(a) {
				return a.storeId
			}
		}, function() {
			Ext.regStore = function(c, b) {
				var a;
				if (Ext.isObject(c)) {
					b = c
				} else {
					b.storeId = c
				}
				if (b instanceof Ext.data.Store) {
					a = b
				} else {
					a = Ext.create("Ext.data.Store", b)
				}
				return Ext.data.StoreManager.register(a)
			};
			Ext.getStore = function(a) {
				return Ext.data.StoreManager.lookup(a)
			}
		});
Ext.define("Ext.draw.CompositeSprite", {
	extend : "Ext.util.MixedCollection",
	mixins : {
		animate : "Ext.util.Animate"
	},
	isCompositeSprite : true,
	constructor : function(a) {
		var b = this;
		a = a || {};
		Ext.apply(b, a);
		b.addEvents("mousedown", "mouseup", "mouseover", "mouseout", "click");
		b.id = Ext.id(null, "ext-sprite-group-");
		b.callParent()
	},
	onClick : function(a) {
		this.fireEvent("click", a)
	},
	onMouseUp : function(a) {
		this.fireEvent("mouseup", a)
	},
	onMouseDown : function(a) {
		this.fireEvent("mousedown", a)
	},
	onMouseOver : function(a) {
		this.fireEvent("mouseover", a)
	},
	onMouseOut : function(a) {
		this.fireEvent("mouseout", a)
	},
	attachEvents : function(b) {
		var a = this;
		b.on({
					scope : a,
					mousedown : a.onMouseDown,
					mouseup : a.onMouseUp,
					mouseover : a.onMouseOver,
					mouseout : a.onMouseOut,
					click : a.onClick
				})
	},
	add : function(b, c) {
		var a = this.callParent(arguments);
		this.attachEvents(a);
		return a
	},
	insert : function(a, b, c) {
		return this.callParent(arguments)
	},
	remove : function(b) {
		var a = this;
		b.un({
					scope : a,
					mousedown : a.onMouseDown,
					mouseup : a.onMouseUp,
					mouseover : a.onMouseOver,
					mouseout : a.onMouseOut,
					click : a.onClick
				});
		a.callParent(arguments)
	},
	getBBox : function() {
		var e = 0, m, h, j = this.items, f = this.length, g = Infinity, c = g, l = -g, b = g, k = -g, d, a;
		for (; e < f; e++) {
			m = j[e];
			if (m.el) {
				h = m.getBBox();
				c = Math.min(c, h.x);
				b = Math.min(b, h.y);
				l = Math.max(l, h.height + h.y);
				k = Math.max(k, h.width + h.x)
			}
		}
		return {
			x : c,
			y : b,
			height : l - b,
			width : k - c
		}
	},
	setAttributes : function(c, e) {
		var d = 0, b = this.items, a = this.length;
		for (; d < a; d++) {
			b[d].setAttributes(c, e)
		}
		return this
	},
	hide : function(c) {
		var d = 0, b = this.items, a = this.length;
		for (; d < a; d++) {
			b[d].hide()
		}
		return this
	},
	show : function(c) {
		var d = 0, b = this.items, a = this.length;
		for (; d < a; d++) {
			b[d].show()
		}
		return this
	},
	redraw : function() {
		var e = this, d = 0, c = e.items, b = e.getSurface(), a = e.length;
		if (b) {
			for (; d < a; d++) {
				b.renderItem(c[d])
			}
		}
		return e
	},
	setStyle : function(f) {
		var c = 0, b = this.items, a = this.length, e, d;
		for (; c < a; c++) {
			e = b[c];
			d = e.el;
			if (d) {
				d.setStyle(f)
			}
		}
	},
	addCls : function(e) {
		var d = 0, c = this.items, b = this.getSurface(), a = this.length;
		if (b) {
			for (; d < a; d++) {
				b.addCls(c[d], e)
			}
		}
	},
	removeCls : function(e) {
		var d = 0, c = this.items, b = this.getSurface(), a = this.length;
		if (b) {
			for (; d < a; d++) {
				b.removeCls(c[d], e)
			}
		}
	},
	getSurface : function() {
		var a = this.first();
		if (a) {
			return a.surface
		}
		return null
	},
	destroy : function() {
		var c = this, a = c.getSurface(), b;
		if (a) {
			while (c.getCount() > 0) {
				b = c.first();
				c.remove(b);
				a.remove(b)
			}
		}
		c.clearListeners()
	}
});
Ext.define("Ext.chart.LegendItem", {
	extend : "Ext.draw.CompositeSprite",
	requires : ["Ext.chart.Shape"],
	x : 0,
	y : 0,
	zIndex : 500,
	constructor : function(a) {
		this.callParent(arguments);
		this.createLegend(a)
	},
	createLegend : function(r) {
		var s = this, h = r.yFieldIndex, k = s.series, a = k.type, l = s.yFieldIndex, d = s.legend, o = s.surface, p = d.x
				+ s.x, m = d.y + s.y, c, j = s.zIndex, b, i, q, e, n = false, g = Ext
				.apply(k.seriesStyle, k.style);
		function f(t) {
			var u = k[t];
			return (Ext.isArray(u) ? u[l] : u)
		}
		i = s.add("label", o.add({
							type : "text",
							x : 20,
							y : 0,
							zIndex : j || 0,
							font : d.labelFont,
							text : f("title") || f("yField")
						}));
		if (a === "line" || a === "scatter") {
			if (a === "line") {
				s.add("line", o.add({
									type : "path",
									path : "M0.5,0.5L16.5,0.5",
									zIndex : j,
									"stroke-width" : k.lineWidth,
									"stroke-linejoin" : "round",
									"stroke-dasharray" : k.dash,
									stroke : g.stroke || "#000",
									style : {
										cursor : "pointer"
									}
								}))
			}
			if (k.showMarkers || a === "scatter") {
				b = Ext.apply(k.markerStyle, k.markerConfig || {});
				s.add("marker", Ext.chart.Shape[b.type](o, {
									fill : b.fill,
									x : 8.5,
									y : 0.5,
									zIndex : j,
									radius : b.radius || b.size,
									style : {
										cursor : "pointer"
									}
								}))
			}
		} else {
			s.add("box", o.add({
								type : "rect",
								zIndex : j,
								x : 0,
								y : 0,
								width : 12,
								height : 12,
								fill : k.getLegendColor(h),
								style : {
									cursor : "pointer"
								}
							}))
		}
		s.setAttributes({
					hidden : false
				}, true);
		c = s.getBBox();
		q = s.add("mask", o.add({
							type : "rect",
							x : c.x,
							y : c.y,
							width : c.width || 20,
							height : c.height || 20,
							zIndex : (j || 0) + 1000,
							fill : "#f00",
							opacity : 0,
							style : {
								cursor : "pointer"
							}
						}));
		s.on("mouseover", function() {
					i.setStyle({
								"font-weight" : "bold"
							});
					q.setStyle({
								cursor : "pointer"
							});
					k._index = h;
					k.highlightItem()
				}, s);
		s.on("mouseout", function() {
					i.setStyle({
								"font-weight" : "normal"
							});
					k._index = h;
					k.unHighlightItem()
				}, s);
		if (!k.visibleInLegend(h)) {
			n = true;
			i.setAttributes({
						opacity : 0.5
					}, true)
		}
		s.on("mousedown", function() {
					if (!n) {
						k.hideAll();
						i.setAttributes({
									opacity : 0.5
								}, true)
					} else {
						k.showAll();
						i.setAttributes({
									opacity : 1
								}, true)
					}
					n = !n
				}, s);
		s.updatePosition({
					x : 0,
					y : 0
				})
	},
	updatePosition : function(c) {
		var f = this, a = f.items, e = a.length, b = 0, d;
		if (!c) {
			c = f.legend
		}
		for (; b < e; b++) {
			d = a[b];
			switch (d.type) {
				case "text" :
					d.setAttributes({
								x : 20 + c.x + f.x,
								y : c.y + f.y
							}, true);
					break;
				case "rect" :
					d.setAttributes({
								translate : {
									x : c.x + f.x,
									y : c.y + f.y - 6
								}
							}, true);
					break;
				default :
					d.setAttributes({
								translate : {
									x : c.x + f.x,
									y : c.y + f.y
								}
							}, true)
			}
		}
	}
});
Ext.define("Ext.chart.Legend", {
	requires : ["Ext.chart.LegendItem"],
	visible : true,
	position : "bottom",
	x : 0,
	y : 0,
	labelFont : "12px Helvetica, sans-serif",
	boxStroke : "#000",
	boxStrokeWidth : 1,
	boxFill : "#FFF",
	itemSpacing : 10,
	padding : 5,
	width : 0,
	height : 0,
	boxZIndex : 100,
	constructor : function(a) {
		var b = this;
		if (a) {
			Ext.apply(b, a)
		}
		b.items = [];
		b.isVertical = ("left|right|float".indexOf(b.position) !== -1);
		b.origX = b.x;
		b.origY = b.y
	},
	create : function() {
		var a = this;
		a.createItems();
		if (!a.created && a.isDisplayed()) {
			a.createBox();
			a.created = true;
			a.chart.series.each(function(b) {
						b.on("titlechange", function() {
									a.create();
									a.updatePosition()
								})
					})
		}
	},
	isDisplayed : function() {
		return this.visible
				&& this.chart.series.findIndex("showInLegend", true) !== -1
	},
	createItems : function() {
		var z = this, m = z.chart, r = m.surface, o = z.items, l = z.padding, A = z.itemSpacing, h = 2, u = 0, q = 0, e = 0, w = 0, b = z.isVertical, d = Math, c = d.floor, B = d.max, g = 0, s = 0, t = o
				? o.length
				: 0, k, j, f, v, a, n, p;
		if (t) {
			for (; s < t; s++) {
				o[s].destroy()
			}
		}
		o.length = [];
		m.series.each(function(y, x) {
					if (y.showInLegend) {
						Ext.each([].concat(y.yField), function(C, i) {
									v = Ext.create("Ext.chart.LegendItem", {
												legend : this,
												series : y,
												surface : m.surface,
												yFieldIndex : i
											});
									a = v.getBBox();
									p = a.width;
									n = a.height;
									if (x + i === 0) {
										f = b ? l + n / 2 : l
									} else {
										f = A / (b ? 2 : 1)
									}
									v.x = c(b ? l : e + f);
									v.y = c(b ? w + f : l + n / 2);
									e += p + f;
									w += n + f;
									u = B(u, p);
									q = B(q, n);
									o.push(v)
								}, this)
					}
				}, z);
		z.width = c((b ? u : e) + l * 2);
		if (b && o.length === 1) {
			h = 1
		}
		z.height = c((b ? w - h * f : q) + (l * 2));
		z.itemHeight = q
	},
	getBBox : function() {
		var a = this;
		return {
			x : Math.round(a.x) - a.boxStrokeWidth / 2,
			y : Math.round(a.y) - a.boxStrokeWidth / 2,
			width : a.width,
			height : a.height
		}
	},
	createBox : function() {
		var b = this, a = b.boxSprite = b.chart.surface.add(Ext.apply({
					type : "rect",
					stroke : b.boxStroke,
					"stroke-width" : b.boxStrokeWidth,
					fill : b.boxFill,
					zIndex : b.boxZIndex
				}, b.getBBox()));
		a.redraw()
	},
	updatePosition : function() {
		var h = this, k, i, m = h.width, l = h.height, j = h.padding, g = h.chart, n = g.chartBBox, b = g.insetPadding, d = n.width
				- (b * 2), c = n.height - (b * 2), f = n.x + b, e = n.y + b, a = g.surface, o = Math.floor;
		if (h.isDisplayed()) {
			switch (h.position) {
				case "left" :
					k = b;
					i = o(e + c / 2 - l / 2);
					break;
				case "right" :
					k = o(a.width - m) - b;
					i = o(e + c / 2 - l / 2);
					break;
				case "top" :
					k = o(f + d / 2 - m / 2);
					i = b;
					break;
				case "bottom" :
					k = o(f + d / 2 - m / 2);
					i = o(a.height - l) - b;
					break;
				default :
					k = o(h.origX) + b;
					i = o(h.origY) + b
			}
			h.x = k;
			h.y = i;
			Ext.each(h.items, function(p) {
						p.updatePosition()
					});
			h.boxSprite.setAttributes(h.getBBox(), true)
		}
	}
});
Ext.define("Ext.data.AbstractStore", {
	requires : ["Ext.util.MixedCollection", "Ext.data.Operation",
			"Ext.util.Filter"],
	mixins : {
		observable : "Ext.util.Observable",
		sortable : "Ext.util.Sortable"
	},
	statics : {
		create : function(a) {
			if (!a.isStore) {
				if (!a.type) {
					a.type = "store"
				}
				a = Ext.createByAlias("store." + a.type, a)
			}
			return a
		}
	},
	remoteSort : false,
	remoteFilter : false,
	autoLoad : false,
	autoSync : false,
	batchUpdateMode : "operation",
	filterOnLoad : true,
	sortOnLoad : true,
	implicitModel : false,
	defaultProxyType : "memory",
	isDestroyed : false,
	isStore : true,
	sortRoot : "data",
	constructor : function(a) {
		var b = this;
		b.addEvents("add", "remove", "update", "datachanged", "beforeload",
				"load", "beforesync", "clear");
		Ext.apply(b, a);
		b.removed = [];
		b.mixins.observable.constructor.apply(b, arguments);
		b.model = Ext.ModelManager.getModel(a.model || b.model);
		Ext.applyIf(b, {
					modelDefaults : {}
				});
		if (!b.model && b.fields) {
			b.model = Ext.define("Ext.data.Store.ImplicitModel-"
							+ (b.storeId || Ext.id()), {
						extend : "Ext.data.Model",
						fields : b.fields,
						proxy : b.proxy || b.defaultProxyType
					});
			delete b.fields;
			b.implicitModel = true
		}
		b.setProxy(a.proxy || b.proxy || b.model.getProxy());
		if (b.id && !b.storeId) {
			b.storeId = b.id;
			delete b.id
		}
		if (b.storeId) {
			Ext.data.StoreManager.register(b)
		}
		b.mixins.sortable.initSortable.call(b);
		b.filters = Ext.create("Ext.util.MixedCollection");
		b.filters.addAll(b.decodeFilters(a.filters))
	},
	setProxy : function(a) {
		var b = this;
		if (a instanceof Ext.data.proxy.Proxy) {
			a.setModel(b.model)
		} else {
			if (Ext.isString(a)) {
				a = {
					type : a
				}
			}
			Ext.applyIf(a, {
						model : b.model
					});
			a = Ext.createByAlias("proxy." + a.type, a)
		}
		b.proxy = a;
		return b.proxy
	},
	getProxy : function() {
		return this.proxy
	},
	create : function(e, c) {
		var d = this, a = Ext.ModelManager.create(Ext.applyIf(e,
						d.modelDefaults), d.model.modelName), b;
		c = c || {};
		Ext.applyIf(c, {
					action : "create",
					records : [a]
				});
		b = Ext.create("Ext.data.Operation", c);
		d.proxy.create(b, d.onProxyWrite, d);
		return a
	},
	read : function() {
		return this.load.apply(this, arguments)
	},
	onProxyRead : Ext.emptyFn,
	update : function(b) {
		var c = this, a;
		b = b || {};
		Ext.applyIf(b, {
					action : "update",
					records : c.getUpdatedRecords()
				});
		a = Ext.create("Ext.data.Operation", b);
		return c.proxy.update(a, c.onProxyWrite, c)
	},
	onProxyWrite : function(b) {
		var c = this, d = b.wasSuccessful(), a = b.getRecords();
		switch (b.action) {
			case "create" :
				c.onCreateRecords(a, b, d);
				break;
			case "update" :
				c.onUpdateRecords(a, b, d);
				break;
			case "destroy" :
				c.onDestroyRecords(a, b, d);
				break
		}
		if (d) {
			c.fireEvent("write", c, b);
			c.fireEvent("datachanged", c)
		}
		Ext.callback(b.callback, b.scope || c, [a, b, d])
	},
	destroy : function(b) {
		var c = this, a;
		b = b || {};
		Ext.applyIf(b, {
					action : "destroy",
					records : c.getRemovedRecords()
				});
		a = Ext.create("Ext.data.Operation", b);
		return c.proxy.destroy(a, c.onProxyWrite, c)
	},
	onBatchOperationComplete : function(b, a) {
		return this.onProxyWrite(a)
	},
	onBatchComplete : function(c, a) {
		var f = this, b = c.operations, e = b.length, d;
		f.suspendEvents();
		for (d = 0; d < e; d++) {
			f.onProxyWrite(b[d])
		}
		f.resumeEvents();
		f.fireEvent("datachanged", f)
	},
	onBatchException : function(b, a) {
	},
	filterNew : function(a) {
		return a.phantom === true && a.isValid()
	},
	getNewRecords : function() {
		return []
	},
	getUpdatedRecords : function() {
		return []
	},
	filterUpdated : function(a) {
		return a.dirty === true && a.phantom !== true && a.isValid()
	},
	getRemovedRecords : function() {
		return this.removed
	},
	filter : function(a, b) {
	},
	decodeFilters : function(e) {
		if (!Ext.isArray(e)) {
			if (e === undefined) {
				e = []
			} else {
				e = [e]
			}
		}
		var d = e.length, a = Ext.util.Filter, b, c;
		for (c = 0; c < d; c++) {
			b = e[c];
			if (!(b instanceof a)) {
				Ext.apply(b, {
							root : "data"
						});
				if (b.fn) {
					b.filterFn = b.fn
				}
				if (typeof b == "function") {
					b = {
						filterFn : b
					}
				}
				e[c] = new a(b)
			}
		}
		return e
	},
	clearFilter : function(a) {
	},
	isFiltered : function() {
	},
	filterBy : function(b, a) {
	},
	sync : function() {
		var d = this, b = {}, e = d.getNewRecords(), c = d.getUpdatedRecords(), a = d
				.getRemovedRecords(), f = false;
		if (e.length > 0) {
			b.create = e;
			f = true
		}
		if (c.length > 0) {
			b.update = c;
			f = true
		}
		if (a.length > 0) {
			b.destroy = a;
			f = true
		}
		if (f && d.fireEvent("beforesync", b) !== false) {
			d.proxy.batch(b, d.getBatchListeners())
		}
	},
	getBatchListeners : function() {
		var b = this, a = {
			scope : b,
			exception : b.onBatchException
		};
		if (b.batchUpdateMode == "operation") {
			a.operationcomplete = b.onBatchOperationComplete
		} else {
			a.complete = b.onBatchComplete
		}
		return a
	},
	save : function() {
		return this.sync.apply(this, arguments)
	},
	load : function(b) {
		var c = this, a;
		b = b || {};
		Ext.applyIf(b, {
					action : "read",
					filters : c.filters.items,
					sorters : c.getSorters()
				});
		a = Ext.create("Ext.data.Operation", b);
		if (c.fireEvent("beforeload", c, a) !== false) {
			c.loading = true;
			c.proxy.read(a, c.onProxyLoad, c)
		}
		return c
	},
	afterEdit : function(a) {
		var b = this;
		if (b.autoSync) {
			b.sync()
		}
		b.fireEvent("update", b, a, Ext.data.Model.EDIT)
	},
	afterReject : function(a) {
		this.fireEvent("update", this, a, Ext.data.Model.REJECT)
	},
	afterCommit : function(a) {
		this.fireEvent("update", this, a, Ext.data.Model.COMMIT)
	},
	clearData : Ext.emptyFn,
	destroyStore : function() {
		var a = this;
		if (!a.isDestroyed) {
			if (a.storeId) {
				Ext.data.StoreManager.unregister(a)
			}
			a.clearData();
			a.data = null;
			a.tree = null;
			a.reader = a.writer = null;
			a.clearListeners();
			a.isDestroyed = true;
			if (a.implicitModel) {
				Ext.destroy(a.model)
			}
		}
	},
	doSort : function(a) {
		var b = this;
		if (b.remoteSort) {
			b.load()
		} else {
			b.data.sortBy(a);
			b.fireEvent("datachanged", b)
		}
	},
	getCount : Ext.emptyFn,
	getById : Ext.emptyFn,
	removeAll : Ext.emptyFn,
	isLoading : function() {
		return this.loading
	}
});
Ext.define("Ext.draw.Surface", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	requires : ["Ext.draw.CompositeSprite"],
	uses : ["Ext.draw.engine.Svg", "Ext.draw.engine.Vml"],
	separatorRe : /[, ]+/,
	statics : {
		create : function(b, d) {
			d = d || ["Svg", "Vml"];
			var c = 0, a = d.length, e;
			for (; c < a; c++) {
				if (Ext.supports[d[c]]) {
					return Ext.create("Ext.draw.engine." + d[c], b)
				}
			}
			return false
		}
	},
	availableAttrs : {
		blur : 0,
		"clip-rect" : "0 0 1e9 1e9",
		cursor : "default",
		cx : 0,
		cy : 0,
		"dominant-baseline" : "auto",
		fill : "none",
		"fill-opacity" : 1,
		font : '10px "Arial"',
		"font-family" : '"Arial"',
		"font-size" : "10",
		"font-style" : "normal",
		"font-weight" : 400,
		gradient : "",
		height : 0,
		hidden : false,
		href : "http://sencha.com/",
		opacity : 1,
		path : "M0,0",
		radius : 0,
		rx : 0,
		ry : 0,
		scale : "1 1",
		src : "",
		stroke : "#000",
		"stroke-dasharray" : "",
		"stroke-linecap" : "butt",
		"stroke-linejoin" : "butt",
		"stroke-miterlimit" : 0,
		"stroke-opacity" : 1,
		"stroke-width" : 1,
		target : "_blank",
		text : "",
		"text-anchor" : "middle",
		title : "Ext Draw",
		width : 0,
		x : 0,
		y : 0,
		zIndex : 0
	},
	container : undefined,
	height : 352,
	width : 512,
	x : 0,
	y : 0,
	constructor : function(a) {
		var b = this;
		a = a || {};
		Ext.apply(b, a);
		b.domRef = Ext.getDoc().dom;
		b.customAttributes = {};
		b.addEvents("mousedown", "mouseup", "mouseover", "mouseout",
				"mousemove", "mouseenter", "mouseleave", "click");
		b.mixins.observable.constructor.call(b);
		b.getId();
		b.initGradients();
		b.initItems();
		if (b.renderTo) {
			b.render(b.renderTo);
			delete b.renderTo
		}
		b.initBackground(a.background)
	},
	initSurface : Ext.emptyFn,
	renderItem : Ext.emptyFn,
	renderItems : Ext.emptyFn,
	setViewBox : Ext.emptyFn,
	addCls : Ext.emptyFn,
	removeCls : Ext.emptyFn,
	setStyle : Ext.emptyFn,
	initGradients : function() {
		var a = this.gradients;
		if (a) {
			Ext.each(a, this.addGradient, this)
		}
	},
	initItems : function() {
		var a = this.items;
		this.items = Ext.create("Ext.draw.CompositeSprite");
		this.groups = Ext.create("Ext.draw.CompositeSprite");
		if (a) {
			this.add(a)
		}
	},
	initBackground : function(b) {
		var e, f, d, c = this.width, a = this.height;
		if (b) {
			if (b.gradient) {
				f = b.gradient;
				e = f.id;
				this.addGradient(f);
				this.background = this.add({
							type : "rect",
							x : 0,
							y : 0,
							width : c,
							height : a,
							fill : "url(#" + e + ")"
						})
			} else {
				if (b.fill) {
					this.background = this.add({
								type : "rect",
								x : 0,
								y : 0,
								width : c,
								height : a,
								fill : b.fill
							})
				} else {
					if (b.image) {
						this.background = this.add({
									type : "image",
									x : 0,
									y : 0,
									width : c,
									height : a,
									src : b.image
								})
					}
				}
			}
		}
	},
	setSize : function(a, b) {
		if (this.background) {
			this.background.setAttributes({
						width : a,
						height : b,
						hidden : false
					}, true)
		}
	},
	scrubAttrs : function(d) {
		var c, b = {}, a = {}, e = d.attr;
		for (c in e) {
			if (this.translateAttrs.hasOwnProperty(c)) {
				b[this.translateAttrs[c]] = e[c];
				a[this.translateAttrs[c]] = true
			} else {
				if (this.availableAttrs.hasOwnProperty(c) && !a[c]) {
					b[c] = e[c]
				}
			}
		}
		return b
	},
	onClick : function(a) {
		this.processEvent("click", a)
	},
	onMouseUp : function(a) {
		this.processEvent("mouseup", a)
	},
	onMouseDown : function(a) {
		this.processEvent("mousedown", a)
	},
	onMouseOver : function(a) {
		this.processEvent("mouseover", a)
	},
	onMouseOut : function(a) {
		this.processEvent("mouseout", a)
	},
	onMouseMove : function(a) {
		this.fireEvent("mousemove", a)
	},
	onMouseEnter : Ext.emptyFn,
	onMouseLeave : Ext.emptyFn,
	addGradient : Ext.emptyFn,
	add : function() {
		var f = Array.prototype.slice.call(arguments), h, d;
		var a = f.length > 1;
		if (a || Ext.isArray(f[0])) {
			var g = a ? f : f[0], b = [], c, e, j;
			for (c = 0, e = g.length; c < e; c++) {
				j = g[c];
				j = this.add(j);
				b.push(j)
			}
			return b
		}
		h = this.prepareItems(f[0], true)[0];
		this.normalizeSpriteCollection(h);
		this.onAdd(h);
		return h
	},
	normalizeSpriteCollection : function(c) {
		var b = this.items, d = c.attr.zIndex, a = b.indexOf(c);
		if (a < 0 || (a > 0 && b.getAt(a - 1).attr.zIndex > d)
				|| (a < b.length - 1 && b.getAt(a + 1).attr.zIndex < d)) {
			b.removeAt(a);
			a = b.findIndexBy(function(e) {
						return e.attr.zIndex > d
					});
			if (a < 0) {
				a = b.length
			}
			b.insert(a, c)
		}
		return a
	},
	onAdd : function(d) {
		var f = d.group, b = d.draggable, a, e, c;
		if (f) {
			a = [].concat(f);
			e = a.length;
			for (c = 0; c < e; c++) {
				f = a[c];
				this.getGroup(f).add(d)
			}
			delete d.group
		}
		if (b) {
			d.initDraggable()
		}
	},
	remove : function(a, b) {
		if (a) {
			this.items.remove(a);
			this.groups.each(function(c) {
						c.remove(a)
					});
			a.onRemove();
			if (b === true) {
				a.destroy()
			}
		}
	},
	removeAll : function(d) {
		var a = this.items.items, c = a.length, b;
		for (b = c - 1; b > -1; b--) {
			this.remove(a[b], d)
		}
	},
	onRemove : Ext.emptyFn,
	onDestroy : Ext.emptyFn,
	applyTransformations : function(b) {
		b.bbox.transform = 0;
		this.transform(b);
		var d = this, c = false, a = b.attr;
		if (a.translation.x != null || a.translation.y != null) {
			d.translate(b);
			c = true
		}
		if (a.scaling.x != null || a.scaling.y != null) {
			d.scale(b);
			c = true
		}
		if (a.rotation.degrees != null) {
			d.rotate(b);
			c = true
		}
		if (c) {
			b.bbox.transform = 0;
			this.transform(b);
			b.transformations = []
		}
	},
	rotate : function(a) {
		var e, b = a.attr.rotation.degrees, d = a.attr.rotation.x, c = a.attr.rotation.y;
		if (!Ext.isNumber(d) || !Ext.isNumber(c)) {
			e = this.getBBox(a);
			d = !Ext.isNumber(d) ? e.x + e.width / 2 : d;
			c = !Ext.isNumber(c) ? e.y + e.height / 2 : c
		}
		a.transformations.push({
					type : "rotate",
					degrees : b,
					x : d,
					y : c
				})
	},
	translate : function(b) {
		var a = b.attr.translation.x || 0, c = b.attr.translation.y || 0;
		b.transformations.push({
					type : "translate",
					x : a,
					y : c
				})
	},
	scale : function(b) {
		var e, a = b.attr.scaling.x || 1, f = b.attr.scaling.y || 1, d = b.attr.scaling.centerX, c = b.attr.scaling.centerY;
		if (!Ext.isNumber(d) || !Ext.isNumber(c)) {
			e = this.getBBox(b);
			d = !Ext.isNumber(d) ? e.x + e.width / 2 : d;
			c = !Ext.isNumber(c) ? e.y + e.height / 2 : c
		}
		b.transformations.push({
					type : "scale",
					x : a,
					y : f,
					centerX : d,
					centerY : c
				})
	},
	rectPath : function(a, e, b, c, d) {
		if (d) {
			return [["M", a + d, e], ["l", b - d * 2, 0],
					["a", d, d, 0, 0, 1, d, d], ["l", 0, c - d * 2],
					["a", d, d, 0, 0, 1, -d, d], ["l", d * 2 - b, 0],
					["a", d, d, 0, 0, 1, -d, -d], ["l", 0, d * 2 - c],
					["a", d, d, 0, 0, 1, d, -d], ["z"]]
		}
		return [["M", a, e], ["l", b, 0], ["l", 0, c], ["l", -b, 0], ["z"]]
	},
	ellipsePath : function(a, d, c, b) {
		if (b == null) {
			b = c
		}
		return [["M", a, d], ["m", 0, -b], ["a", c, b, 0, 1, 1, 0, 2 * b],
				["a", c, b, 0, 1, 1, 0, -2 * b], ["z"]]
	},
	getPathpath : function(a) {
		return a.attr.path
	},
	getPathcircle : function(c) {
		var b = c.attr;
		return this.ellipsePath(b.x, b.y, b.radius, b.radius)
	},
	getPathellipse : function(c) {
		var b = c.attr;
		return this.ellipsePath(b.x, b.y, b.radiusX, b.radiusY)
	},
	getPathrect : function(c) {
		var b = c.attr;
		return this.rectPath(b.x, b.y, b.width, b.height, b.r)
	},
	getPathimage : function(c) {
		var b = c.attr;
		return this.rectPath(b.x || 0, b.y || 0, b.width, b.height)
	},
	getPathtext : function(a) {
		var b = this.getBBoxText(a);
		return this.rectPath(b.x, b.y, b.width, b.height)
	},
	createGroup : function(b) {
		var a = this.groups.get(b);
		if (!a) {
			a = Ext.create("Ext.draw.CompositeSprite", {
						surface : this
					});
			a.id = b || Ext.id(null, "ext-surface-group-");
			this.groups.add(a)
		}
		return a
	},
	getGroup : function(b) {
		if (typeof b == "string") {
			var a = this.groups.get(b);
			if (!a) {
				a = this.createGroup(b)
			}
		} else {
			a = b
		}
		return a
	},
	prepareItems : function(a, c) {
		a = [].concat(a);
		var e, b, d;
		for (b = 0, d = a.length; b < d; b++) {
			e = a[b];
			if (!(e instanceof Ext.draw.Sprite)) {
				e.surface = this;
				a[b] = this.createItem(e)
			} else {
				e.surface = this
			}
		}
		return a
	},
	setText : Ext.emptyFn,
	createItem : Ext.emptyFn,
	getId : function() {
		return this.id || (this.id = Ext.id(null, "ext-surface-"))
	},
	destroy : function() {
		delete this.domRef;
		this.removeAll()
	}
});
Ext.ns("Ext.fx");
Ext.require("Ext.fx.CubicBezier", function() {
	var e = Math, g = e.PI, d = e.pow, b = e.sin, f = e.sqrt, a = e.abs, c = 1.70158;
	Ext.fx.Easing = {};
	Ext.apply(Ext.fx.Easing, {
		linear : function(h) {
			return h
		},
		ease : function(k) {
			var h = 0.07813 - k / 2, l = -0.25, m = f(0.0066 + h * h), p = m
					- h, j = d(a(p), 1 / 3) * (p < 0 ? -1 : 1), o = -m - h, i = d(
					a(o), 1 / 3)
					* (o < 0 ? -1 : 1), r = j + i + 0.25;
			return d(1 - r, 2) * 3 * r * 0.1 + (1 - r) * 3 * r * r + r * r * r
		},
		easeIn : function(h) {
			return d(h, 1.7)
		},
		easeOut : function(h) {
			return d(h, 0.48)
		},
		easeInOut : function(p) {
			var k = 0.48 - p / 1.04, j = f(0.1734 + k * k), h = j - k, o = d(
					a(h), 1 / 3)
					* (h < 0 ? -1 : 1), m = -j - k, l = d(a(m), 1 / 3)
					* (m < 0 ? -1 : 1), i = o + l + 0.5;
			return (1 - i) * 3 * i * i + i * i * i
		},
		backIn : function(h) {
			return h * h * ((c + 1) * h - c)
		},
		backOut : function(h) {
			h = h - 1;
			return h * h * ((c + 1) * h + c) + 1
		},
		elasticIn : function(j) {
			if (j === 0 || j === 1) {
				return j
			}
			var i = 0.3, h = i / 4;
			return d(2, -10 * j) * b((j - h) * (2 * g) / i) + 1
		},
		elasticOut : function(h) {
			return 1 - Ext.fx.Easing.elasticIn(1 - h)
		},
		bounceIn : function(h) {
			return 1 - Ext.fx.Easing.bounceOut(1 - h)
		},
		bounceOut : function(k) {
			var i = 7.5625, j = 2.75, h;
			if (k < (1 / j)) {
				h = i * k * k
			} else {
				if (k < (2 / j)) {
					k -= (1.5 / j);
					h = i * k * k + 0.75
				} else {
					if (k < (2.5 / j)) {
						k -= (2.25 / j);
						h = i * k * k + 0.9375
					} else {
						k -= (2.625 / j);
						h = i * k * k + 0.984375
					}
				}
			}
			return h
		}
	});
	Ext.apply(Ext.fx.Easing, {
				"back-in" : Ext.fx.Easing.backIn,
				"back-out" : Ext.fx.Easing.backOut,
				"ease-in" : Ext.fx.Easing.easeIn,
				"ease-out" : Ext.fx.Easing.easeOut,
				"elastic-in" : Ext.fx.Easing.elasticIn,
				"elastic-out" : Ext.fx.Easing.elasticIn,
				"bounce-in" : Ext.fx.Easing.bounceIn,
				"bounce-out" : Ext.fx.Easing.bounceOut,
				"ease-in-out" : Ext.fx.Easing.easeInOut
			})
});
Ext.define("Ext.util.Grouper", {
			extend : "Ext.util.Sorter",
			getGroupString : function(a) {
				return a.get(this.property)
			}
		});
Ext.define("Ext.layout.container.Auto", {
			alias : ["layout.auto", "layout.autocontainer"],
			extend : "Ext.layout.container.Container",
			type : "autocontainer",
			fixedLayout : false,
			bindToOwnerCtComponent : true,
			onLayout : function(a, f) {
				var e = this, b = e.getLayoutItems(), d = b.length, c;
				if (d) {
					if (!e.clearEl) {
						e.clearEl = e.getRenderTarget().createChild({
									cls : Ext.baseCSSPrefix + "clear",
									role : "presentation"
								})
					}
					for (c = 0; c < d; c++) {
						e.setItemSize(b[c])
					}
				}
			}
		});
Ext.define("Ext.layout.component.AbstractDock", {
	extend : "Ext.layout.component.Component",
	type : "dock",
	autoSizing : true,
	beforeLayout : function() {
		var a = this.callParent(arguments);
		if (a !== false && (!this.initializedBorders || this.childrenChanged)
				&& (!this.owner.border || this.owner.manageBodyBorders)) {
			this.handleItemBorders();
			this.initializedBorders = true
		}
		return a
	},
	handleItemBorders : function() {
		var a = this.owner, e = a.body, l = this.getLayoutItems(), g = {
			top : [],
			right : [],
			bottom : [],
			left : []
		}, b = this.borders, d = {
			top : "bottom",
			right : "left",
			bottom : "top",
			left : "right"
		}, c, h, k, j, f;
		for (c = 0, h = l.length; c < h; c++) {
			k = l[c];
			j = k.dock;
			if (k.ignoreBorderManagement) {
				continue
			}
			if (!g[j].satisfied) {
				g[j].push(k);
				g[j].satisfied = true
			}
			if (!g.top.satisfied && d[j] !== "top") {
				g.top.push(k)
			}
			if (!g.right.satisfied && d[j] !== "right") {
				g.right.push(k)
			}
			if (!g.bottom.satisfied && d[j] !== "bottom") {
				g.bottom.push(k)
			}
			if (!g.left.satisfied && d[j] !== "left") {
				g.left.push(k)
			}
		}
		if (b) {
			for (f in b) {
				if (b.hasOwnProperty(f)) {
					h = b[f].length;
					if (!a.manageBodyBorders) {
						for (c = 0; c < h; c++) {
							b[f][c].removeCls(Ext.baseCSSPrefix
									+ "docked-noborder-" + f)
						}
						if (!b[f].satisfied && !a.bodyBorder) {
							e.removeCls(Ext.baseCSSPrefix + "docked-noborder-"
									+ f)
						}
					} else {
						if (b[f].satisfied) {
							e.setStyle("border-" + f + "-width", "")
						}
					}
				}
			}
		}
		for (f in g) {
			if (g.hasOwnProperty(f)) {
				h = g[f].length;
				if (!a.manageBodyBorders) {
					for (c = 0; c < h; c++) {
						g[f][c].addCls(Ext.baseCSSPrefix + "docked-noborder-"
								+ f)
					}
					if ((!g[f].satisfied && !a.bodyBorder)
							|| a.bodyBorder === false) {
						e.addCls(Ext.baseCSSPrefix + "docked-noborder-" + f)
					}
				} else {
					if (g[f].satisfied) {
						e.setStyle("border-" + f + "-width", "1px")
					}
				}
			}
		}
		this.borders = g
	},
	onLayout : function(a, m) {
		var i = this, b = i.owner, g = b.body, f = b.layout, h = i.getTarget(), k = false, l = false, j, e, d;
		var c = i.info = {
			boxes : [],
			size : {
				width : a,
				height : m
			},
			bodyBox : {}
		};
		Ext.applyIf(c, i.getTargetInfo());
		if (b && b.ownerCt && b.ownerCt.layout && b.ownerCt.layout.isLayout) {
			if (!Ext.isNumber(b.height) || !Ext.isNumber(b.width)) {
				b.ownerCt.layout.bindToOwnerCtComponent = true
			} else {
				b.ownerCt.layout.bindToOwnerCtComponent = false
			}
		}
		if (m === undefined || m === null || a === undefined || a === null) {
			j = c.padding;
			e = c.border;
			d = i.frameSize;
			if ((m === undefined || m === null)
					&& (a === undefined || a === null)) {
				l = true;
				k = true;
				i.setTargetSize(null);
				i.setBodyBox({
							width : null,
							height : null
						})
			} else {
				if (m === undefined || m === null) {
					l = true;
					i.setTargetSize(a);
					i.setBodyBox({
								width : a - j.left - e.left - j.right - e.right
										- d.left - d.right,
								height : null
							})
				} else {
					k = true;
					i.setTargetSize(null, m);
					i.setBodyBox({
								width : null,
								height : m - j.top - j.bottom - e.top
										- e.bottom - d.top - d.bottom
							})
				}
			}
			if (f && f.isLayout) {
				f.bindToOwnerCtComponent = true;
				f.layout();
				c.autoSizedCtLayout = f.autoSize === true
			}
			i.dockItems(k, l);
			i.setTargetSize(c.size.width, c.size.height)
		} else {
			i.setTargetSize(a, m);
			i.dockItems()
		}
		i.callParent(arguments)
	},
	dockItems : function(g, a) {
		this.calculateDockBoxes(g, a);
		var f = this.info, c = f.boxes, e = c.length, d, b;
		for (b = 0; b < e; b++) {
			d = c[b];
			d.item.setPosition(d.x, d.y);
			if ((g || a) && d.layout && d.layout.isLayout) {
				d.layout.bindToOwnerCtComponent = true
			}
		}
		if (!f.autoSizedCtLayout) {
			if (g) {
				f.bodyBox.width = null
			}
			if (a) {
				f.bodyBox.height = null
			}
		}
		this.setBodyBox(f.bodyBox)
	},
	calculateDockBoxes : function(n, o) {
		var k = this, g = k.getTarget(), j = k.getLayoutItems(), a = k.owner, q = a.body, b = k.info, r = b.size, h = j.length, m = b.padding, d = b.border, c = k.frameSize, p, e, f, l;
		if (o) {
			r.height = q.getHeight() + m.top + d.top + m.bottom + d.bottom
					+ c.top + c.bottom
		} else {
			r.height = g.getHeight()
		}
		if (n) {
			r.width = q.getWidth() + m.left + d.left + m.right + d.right
					+ c.left + c.right
		} else {
			r.width = g.getWidth()
		}
		b.bodyBox = {
			x : m.left + c.left,
			y : m.top + c.top,
			width : r.width - m.left - d.left - m.right - d.right - c.left
					- c.right,
			height : r.height - d.top - m.top - d.bottom - m.bottom - c.top
					- c.bottom
		};
		for (e = 0; e < h; e++) {
			p = j[e];
			f = k.initBox(p);
			if (o === true) {
				f = k.adjustAutoBox(f, e)
			} else {
				f = k.adjustSizedBox(f, e)
			}
			b.boxes.push(f)
		}
	},
	adjustSizedBox : function(e, d) {
		var a = this.info.bodyBox, b = this.frameSize, g = this.info, f = g.padding, h = e.type, c = g.border;
		switch (h) {
			case "top" :
				e.y = a.y;
				break;
			case "left" :
				e.x = a.x;
				break;
			case "bottom" :
				e.y = (a.y + a.height) - e.height;
				break;
			case "right" :
				e.x = (a.x + a.width) - e.width;
				break
		}
		if (e.ignoreFrame) {
			if (h == "bottom") {
				e.y += (b.bottom + f.bottom + c.bottom)
			} else {
				e.y -= (b.top + f.top + c.top)
			}
			if (h == "right") {
				e.x += (b.right + f.right + c.right)
			} else {
				e.x -= (b.left + f.left + c.left)
			}
		}
		if (!e.overlay) {
			switch (h) {
				case "top" :
					a.y += e.height;
					a.height -= e.height;
					break;
				case "left" :
					a.x += e.width;
					a.width -= e.width;
					break;
				case "bottom" :
					a.height -= e.height;
					break;
				case "right" :
					a.width -= e.width;
					break
			}
		}
		return e
	},
	adjustAutoBox : function(g, k) {
		var a = this.info, l = a.bodyBox, p = a.size, h = a.boxes, e = h.length, n = g.type, d = this.frameSize, o = a.padding, c = a.border, b = a.autoSizedCtLayout, m = (e < k)
				? e
				: k, f, j;
		if (n == "top" || n == "bottom") {
			for (f = 0; f < m; f++) {
				j = h[f];
				if (j.stretched && j.type == "left" || j.type == "right") {
					j.height += g.height
				} else {
					if (j.type == "bottom") {
						j.y += g.height
					}
				}
			}
		}
		switch (n) {
			case "top" :
				g.y = l.y;
				if (!g.overlay) {
					l.y += g.height
				}
				p.height += g.height;
				break;
			case "bottom" :
				g.y = (l.y + l.height);
				p.height += g.height;
				break;
			case "left" :
				g.x = l.x;
				if (!g.overlay) {
					l.x += g.width;
					if (b) {
						p.width += g.width
					} else {
						l.width -= g.width
					}
				}
				break;
			case "right" :
				if (!g.overlay) {
					if (b) {
						p.width += g.width
					} else {
						l.width -= g.width
					}
				}
				g.x = (l.x + l.width);
				break
		}
		if (g.ignoreFrame) {
			if (n == "bottom") {
				g.y += (d.bottom + o.bottom + c.bottom)
			} else {
				g.y -= (d.top + o.top + c.top)
			}
			if (n == "right") {
				g.x += (d.right + o.right + c.right)
			} else {
				g.x -= (d.left + o.left + c.left)
			}
		}
		return g
	},
	initBox : function(j) {
		var h = this, g = h.info.bodyBox, a = (j.dock == "top" || j.dock == "bottom"), b = h.owner, e = h.frameSize, c = h.info, i = c.padding, d = c.border, f = {
			item : j,
			overlay : j.overlay,
			type : j.dock,
			offsets : Ext.core.Element.parseBox(j.offsets || {}),
			ignoreFrame : j.ignoreParentFrame
		};
		if (j.stretch !== false) {
			f.stretched = true;
			if (a) {
				f.x = g.x + f.offsets.left;
				f.width = g.width - (f.offsets.left + f.offsets.right);
				if (f.ignoreFrame) {
					f.width += (e.left + e.right + d.left + d.right + i.left + i.right)
				}
				j.setCalculatedSize(f.width - j.el.getMargin("lr"), undefined,
						b)
			} else {
				f.y = g.y + f.offsets.top;
				f.height = g.height - (f.offsets.bottom + f.offsets.top);
				if (f.ignoreFrame) {
					f.height += (e.top + e.bottom + d.top + d.bottom + i.top + i.bottom)
				}
				j.setCalculatedSize(undefined, f.height - j.el.getMargin("tb"),
						b);
				if (!Ext.supports.ComputedStyle) {
					j.el.repaint()
				}
			}
		} else {
			j.doComponentLayout();
			f.width = j.getWidth() - (f.offsets.left + f.offsets.right);
			f.height = j.getHeight() - (f.offsets.bottom + f.offsets.top);
			f.y += f.offsets.top;
			if (a) {
				f.x = (j.align == "right") ? g.width - f.width : g.x;
				f.x += f.offsets.left
			}
		}
		if (f.width == undefined) {
			f.width = j.getWidth() + j.el.getMargin("lr")
		}
		if (f.height == undefined) {
			f.height = j.getHeight() + j.el.getMargin("tb")
		}
		return f
	},
	getLayoutItems : function() {
		var c = this.owner.getDockedItems(), d = c.length, b = 0, a = [];
		for (; b < d; b++) {
			if (c[b].isVisible(true)) {
				a.push(c[b])
			}
		}
		return a
	},
	renderItems : function(g, e) {
		var a = e.dom.childNodes, d = a.length, f = g.length, k = 0, c, b, h, l;
		for (c = 0; c < d; c++) {
			h = Ext.get(a[c]);
			for (b = 0; b < f; b++) {
				l = g[b];
				if (l.rendered && (h.id == l.el.id || h.down("#" + l.el.id))) {
					break
				}
			}
			if (b === f) {
				k++
			}
		}
		for (c = 0, b = 0; c < f; c++, b++) {
			l = g[c];
			if (c === b && (l.dock === "right" || l.dock === "bottom")) {
				b += k
			}
			if (l && !l.rendered) {
				this.renderItem(l, e, b)
			} else {
				if (!this.isValidParent(l, e, b)) {
					this.moveItem(l, e, b)
				}
			}
		}
	},
	setBodyBox : function(f) {
		var h = this, a = h.owner, g = a.body, b = h.info, e = b.bodyMargin, i = b.padding, d = b.border, c = h.frameSize;
		if (a.collapsed) {
			return
		}
		if (Ext.isNumber(f.width)) {
			f.width -= e.left + e.right
		}
		if (Ext.isNumber(f.height)) {
			f.height -= e.top + e.bottom
		}
		h.setElementSize(g, f.width, f.height);
		if (Ext.isNumber(f.x)) {
			g.setLeft(f.x - i.left - c.left)
		}
		if (Ext.isNumber(f.y)) {
			g.setTop(f.y - i.top - c.top)
		}
	},
	configureItem : function(a, b) {
		this.callParent(arguments);
		a.addCls(Ext.baseCSSPrefix + "docked");
		a.addClsWithUI("docked-" + a.dock)
	},
	afterRemove : function(a) {
		this.callParent(arguments);
		if (this.itemCls) {
			a.el.removeCls(this.itemCls + "-" + a.dock)
		}
		var b = a.el.dom;
		if (!a.destroying && b) {
			b.parentNode.removeChild(b)
		}
		this.childrenChanged = true
	}
});
Ext.define("Ext.layout.component.Dock", {
			alias : ["layout.dock"],
			extend : "Ext.layout.component.AbstractDock"
		});
Ext.define("Ext.LoadMask", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			requires : ["Ext.data.StoreManager"],
			msg : "Loading...",
			msgCls : Ext.baseCSSPrefix + "mask-loading",
			useMsg : true,
			disabled : false,
			constructor : function(b, a) {
				var c = this;
				if (b.isComponent) {
					c.bindComponent(b)
				} else {
					c.el = Ext.get(b)
				}
				Ext.apply(c, a);
				c.addEvents("beforeshow", "show", "hide");
				if (c.store) {
					c.bindStore(c.store, true)
				}
				c.mixins.observable.constructor.call(c, a)
			},
			bindComponent : function(a) {
				var c = this, b = {
					resize : c.onComponentResize,
					scope : c
				};
				if (a.el) {
					c.onComponentRender(a)
				} else {
					b.render = {
						fn : c.onComponentRender,
						scope : c,
						single : true
					}
				}
				c.mon(a, b)
			},
			onComponentRender : function(a) {
				this.el = a.getContentTarget()
			},
			onComponentResize : function(b, a, c) {
				this.el.isMasked()
			},
			bindStore : function(a, b) {
				var c = this;
				if (!b && c.store) {
					c.mun(c.store, {
								scope : c,
								beforeload : c.onBeforeLoad,
								load : c.onLoad,
								exception : c.onLoad
							});
					if (!a) {
						c.store = null
					}
				}
				if (a) {
					a = Ext.data.StoreManager.lookup(a);
					c.mon(a, {
								scope : c,
								beforeload : c.onBeforeLoad,
								load : c.onLoad,
								exception : c.onLoad
							})
				}
				c.store = a;
				if (a && a.isLoading()) {
					c.onBeforeLoad()
				}
			},
			disable : function() {
				var a = this;
				a.disabled = true;
				if (a.loading) {
					a.onLoad()
				}
			},
			enable : function() {
				this.disabled = false
			},
			isDisabled : function() {
				return this.disabled
			},
			onLoad : function() {
				var a = this;
				a.loading = false;
				a.el.unmask();
				a.fireEvent("hide", a, a.el, a.store)
			},
			onBeforeLoad : function() {
				var a = this;
				if (!a.disabled
						&& !a.loading
						&& a.fireEvent("beforeshow", a, a.el, a.store) !== false) {
					if (a.useMsg) {
						a.el.mask(a.msg, a.msgCls, false)
					} else {
						a.el.mask()
					}
					a.fireEvent("show", a, a.el, a.store);
					a.loading = true
				}
			},
			show : function() {
				this.onBeforeLoad()
			},
			hide : function() {
				this.onLoad()
			},
			destroy : function() {
				this.hide();
				this.clearListeners()
			}
		});
Ext.define("Ext.ComponentLoader", {
			extend : "Ext.ElementLoader",
			statics : {
				Renderer : {
					Data : function(a, b, d) {
						var f = true;
						try {
							a.getTarget().update(Ext.decode(b.responseText))
						} catch (c) {
							f = false
						}
						return f
					},
					Component : function(a, c, g) {
						var h = true, f = a.getTarget(), b = [];
						try {
							b = Ext.decode(c.responseText)
						} catch (d) {
							h = false
						}
						if (h) {
							if (g.removeAll) {
								f.removeAll()
							}
							f.add(b)
						}
						return h
					}
				}
			},
			target : null,
			loadMask : false,
			renderer : "html",
			setTarget : function(b) {
				var a = this;
				if (Ext.isString(b)) {
					b = Ext.getCmp(b)
				}
				if (a.target && a.target != b) {
					a.abort()
				}
				a.target = b
			},
			removeMask : function() {
				this.target.setLoading(false)
			},
			addMask : function(a) {
				this.target.setLoading(a)
			},
			setOptions : function(b, a) {
				b.removeAll = Ext.isDefined(a.removeAll)
						? a.removeAll
						: this.removeAll
			},
			getRenderer : function(b) {
				if (Ext.isFunction(b)) {
					return b
				}
				var a = this.statics().Renderer;
				switch (b) {
					case "component" :
						return a.Component;
					case "data" :
						return a.Data;
					default :
						return Ext.ElementLoader.Renderer.Html
				}
			}
		});
Ext.define("Ext.layout.component.Auto", {
			alias : "layout.autocomponent",
			extend : "Ext.layout.component.Component",
			type : "autocomponent",
			onLayout : function(b, a) {
				this.setTargetSize(b, a)
			}
		});
Ext.define("Ext.layout.component.Draw", {
			alias : "layout.draw",
			extend : "Ext.layout.component.Auto",
			type : "draw",
			onLayout : function(b, a) {
				this.owner.surface.setSize(b, a);
				this.callParent(arguments)
			}
		});
Ext.define("Ext.fx.target.Element", {
			extend : "Ext.fx.target.Target",
			type : "element",
			getElVal : function(b, a, c) {
				if (c == undefined) {
					if (a === "x") {
						c = b.getX()
					} else {
						if (a === "y") {
							c = b.getY()
						} else {
							if (a === "scrollTop") {
								c = b.getScroll().top
							} else {
								if (a === "scrollLeft") {
									c = b.getScroll().left
								} else {
									if (a === "height") {
										c = b.getHeight()
									} else {
										if (a === "width") {
											c = b.getWidth()
										} else {
											c = b.getStyle(a)
										}
									}
								}
							}
						}
					}
				}
				return c
			},
			getAttr : function(a, c) {
				var b = this.target;
				return [[b, this.getElVal(b, a, c)]]
			},
			setAttr : function(k) {
				var f = this.target, h = k.length, m, g, b, e, c, a, d, l;
				for (e = 0; e < h; e++) {
					m = k[e].attrs;
					for (g in m) {
						if (m.hasOwnProperty(g)) {
							a = m[g].length;
							for (c = 0; c < a; c++) {
								b = m[g][c];
								d = b[0];
								l = b[1];
								if (g === "x") {
									d.setX(l)
								} else {
									if (g === "y") {
										d.setY(l)
									} else {
										if (g === "scrollTop") {
											d.scrollTo("top", l)
										} else {
											if (g === "scrollLeft") {
												d.scrollTo("left", l)
											} else {
												d.setStyle(g, l)
											}
										}
									}
								}
							}
						}
					}
				}
			}
		});
Ext.define("Ext.fx.target.CompositeElement", {
			extend : "Ext.fx.target.Element",
			isComposite : true,
			constructor : function(a) {
				a.id = a.id || Ext.id(null, "ext-composite-");
				this.callParent([a])
			},
			getAttr : function(a, d) {
				var b = [], c = this.target;
				c.each(function(e) {
							b.push([e, this.getElVal(e, a, d)])
						}, this);
				return b
			}
		});
Ext.define("Ext.fx.target.Sprite", {
			extend : "Ext.fx.target.Target",
			type : "draw",
			getFromPrim : function(b, a) {
				var c;
				if (a == "translate") {
					c = {
						x : b.attr.translation.x || 0,
						y : b.attr.translation.y || 0
					}
				} else {
					if (a == "rotate") {
						c = {
							degrees : b.attr.rotation.degrees || 0,
							x : b.attr.rotation.x,
							y : b.attr.rotation.y
						}
					} else {
						c = b.attr[a]
					}
				}
				return c
			},
			getAttr : function(a, b) {
				return [[this.target,
						b != undefined ? b : this.getFromPrim(this.target, a)]]
			},
			setAttr : function(m) {
				var g = m.length, k = [], q, f, p, e, b, o, n, d, c, l, h, a;
				for (d = 0; d < g; d++) {
					q = m[d].attrs;
					for (f in q) {
						p = q[f];
						a = p.length;
						for (c = 0; c < a; c++) {
							b = p[c][0];
							e = p[c][1];
							if (f === "translate") {
								n = {
									x : e.x,
									y : e.y
								}
							} else {
								if (f === "rotate") {
									l = e.x;
									if (isNaN(l)) {
										l = null
									}
									h = e.y;
									if (isNaN(h)) {
										h = null
									}
									n = {
										degrees : e.degrees,
										x : l,
										y : h
									}
								} else {
									if (f === "width" || f === "height"
											|| f === "x" || f === "y") {
										n = parseFloat(e)
									} else {
										n = e
									}
								}
							}
							o = Ext.Array.indexOf(k, b);
							if (o == -1) {
								k.push([b, {}]);
								o = k.length - 1
							}
							k[o][1][f] = n
						}
					}
				}
				g = k.length;
				for (d = 0; d < g; d++) {
					b = k[d];
					b[0].setAttributes(b[1])
				}
				this.target.redraw()
			}
		});
Ext.define("Ext.fx.target.CompositeSprite", {
			extend : "Ext.fx.target.Sprite",
			getAttr : function(a, d) {
				var b = [], c = this.target;
				c.each(function(e) {
							b
									.push([
											e,
											d != undefined ? d : this
													.getFromPrim(e, a)])
						}, this);
				return b
			}
		});
Ext.define("Ext.fx.target.Component", {
	extend : "Ext.fx.target.Target",
	type : "component",
	getPropMethod : {
		top : function() {
			return this.getPosition(true)[1]
		},
		left : function() {
			return this.getPosition(true)[0]
		},
		x : function() {
			return this.getPosition()[0]
		},
		y : function() {
			return this.getPosition()[1]
		},
		height : function() {
			return this.getHeight()
		},
		width : function() {
			return this.getWidth()
		},
		opacity : function() {
			return this.el.getStyle("opacity")
		}
	},
	compMethod : {
		top : "setPosition",
		left : "setPosition",
		x : "setPagePosition",
		y : "setPagePosition",
		height : "setSize",
		width : "setSize",
		opacity : "setOpacity"
	},
	getAttr : function(a, b) {
		return [[this.target,
				b !== undefined ? b : this.getPropMethod[a].call(this.target)]]
	},
	setAttr : function(s, e, b) {
		var q = this, l = q.target, p = s.length, u, m, a, f, d, n, k, c, r, t, g;
		for (f = 0; f < p; f++) {
			u = s[f].attrs;
			for (m in u) {
				k = u[m].length;
				n = {
					setPosition : {},
					setPagePosition : {},
					setSize : {},
					setOpacity : {}
				};
				for (d = 0; d < k; d++) {
					a = u[m][d];
					n[q.compMethod[m]].target = a[0];
					n[q.compMethod[m]][m] = a[1]
				}
				if (n.setPosition.target) {
					a = n.setPosition;
					c = (a.left === undefined) ? undefined : parseInt(a.left,
							10);
					r = (a.top === undefined) ? undefined : parseInt(a.top, 10);
					a.target.setPosition(c, r)
				}
				if (n.setPagePosition.target) {
					a = n.setPagePosition;
					a.target.setPagePosition(a.x, a.y)
				}
				if (n.setSize.target) {
					a = n.setSize;
					t = (a.width === undefined)
							? a.target.getWidth()
							: parseInt(a.width, 10);
					g = (a.height === undefined)
							? a.target.getHeight()
							: parseInt(a.height, 10);
					if (b || q.dynamic) {
						a.target.componentLayout.childrenChanged = true;
						if (q.layoutAnimation) {
							a.target.setCalculatedSize(t, g)
						} else {
							a.target.setSize(t, g)
						}
					} else {
						a.target.el.setSize(t, g)
					}
				}
				if (n.setOpacity.target) {
					a = n.setOpacity;
					a.target.el.setStyle("opacity", a.opacity)
				}
			}
		}
	}
});
Ext.define("Ext.fx.Manager", {
	singleton : true,
	requires : ["Ext.util.MixedCollection", "Ext.fx.target.Element",
			"Ext.fx.target.CompositeElement", "Ext.fx.target.Sprite",
			"Ext.fx.target.CompositeSprite", "Ext.fx.target.Component"],
	mixins : {
		queue : "Ext.fx.Queue"
	},
	constructor : function() {
		this.items = Ext.create("Ext.util.MixedCollection");
		this.mixins.queue.constructor.call(this)
	},
	interval : 16,
	forceJS : true,
	createTarget : function(d) {
		var b = this, c = !b.forceJS && Ext.supports.Transitions, a;
		b.useCSS3 = c;
		if (Ext.isString(d)) {
			d = Ext.get(d)
		}
		if (d && d.tagName) {
			d = Ext.get(d);
			a = Ext.create("Ext.fx.target.Element" + (c ? "CSS" : ""), d);
			b.targets.add(a);
			return a
		}
		if (Ext.isObject(d)) {
			if (d.dom) {
				a = Ext.create("Ext.fx.target.Element" + (c ? "CSS" : ""), d)
			} else {
				if (d.isComposite) {
					a = Ext.create("Ext.fx.target.CompositeElement"
									+ (c ? "CSS" : ""), d)
				} else {
					if (d.isSprite) {
						a = Ext.create("Ext.fx.target.Sprite", d)
					} else {
						if (d.isCompositeSprite) {
							a = Ext.create("Ext.fx.target.CompositeSprite", d)
						} else {
							if (d.isComponent) {
								a = Ext.create("Ext.fx.target.Component", d)
							} else {
								if (d.isAnimTarget) {
									return d
								} else {
									return null
								}
							}
						}
					}
				}
			}
			b.targets.add(a);
			return a
		} else {
			return null
		}
	},
	addAnim : function(c) {
		var b = this.items, a = this.task;
		b.add(c);
		if (!a && b.length) {
			a = this.task = {
				run : this.runner,
				interval : this.interval,
				scope : this
			};
			Ext.TaskManager.start(a)
		}
	},
	removeAnim : function(c) {
		var b = this.items, a = this.task;
		b.remove(c);
		if (a && !b.length) {
			Ext.TaskManager.stop(a);
			delete this.task
		}
	},
	startingFilter : function(a) {
		return a.paused === false && a.running === false && a.iterations > 0
	},
	runningFilter : function(a) {
		return a.paused === false && a.running === true
				&& a.isAnimator !== true
	},
	runner : function() {
		var b = this, a = b.items;
		b.targetData = {};
		b.targetArr = {};
		b.timestamp = new Date();
		a.filterBy(b.startingFilter).each(b.startAnim, b);
		a.filterBy(b.runningFilter).each(b.runAnim, b);
		b.applyPendingAttrs()
	},
	startAnim : function(a) {
		a.start(this.timestamp)
	},
	runAnim : function(d) {
		if (!d) {
			return
		}
		var c = this, b = d.target.getId(), f = c.useCSS3
				&& d.target.type == "element", a = c.timestamp - d.startTime, e, g;
		this.collectTargetData(d, a, f);
		if (f) {
			d.target.setAttr(c.targetData[b], true);
			c.targetData[b] = [];
			c.collectTargetData(d, d.duration, f);
			d.paused = true;
			e = d.target.target;
			if (d.target.isComposite) {
				e = d.target.target.last()
			}
			g = {};
			g[Ext.supports.CSS3TransitionEnd] = d.lastFrame;
			g.scope = d;
			g.single = true;
			e.on(g)
		} else {
			if (a >= d.duration) {
				c.applyPendingAttrs(true);
				delete c.targetData[b];
				delete c.targetArr[b];
				d.lastFrame()
			}
		}
	},
	collectTargetData : function(d, a, e) {
		var b = d.target.getId(), f = this.targetData[b], c;
		if (!f) {
			f = this.targetData[b] = [];
			this.targetArr[b] = d.target
		}
		c = {
			duration : d.duration,
			easing : (e && d.reverse)
					? d.easingFn.reverse().toCSS3()
					: d.easing,
			attrs : {}
		};
		Ext.apply(c.attrs, d.runAnim(a));
		f.push(c)
	},
	applyPendingAttrs : function(d) {
		var c = this.targetData, b = this.targetArr, a;
		for (a in c) {
			if (c.hasOwnProperty(a)) {
				b[a].setAttr(c[a], false, d)
			}
		}
	}
});
Ext.define("Ext.fx.Animator", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	requires : ["Ext.fx.Manager"],
	isAnimator : true,
	duration : 250,
	delay : 0,
	delayStart : 0,
	dynamic : false,
	easing : "ease",
	running : false,
	paused : false,
	damper : 1,
	iterations : 1,
	currentIteration : 0,
	keyframeStep : 0,
	animKeyFramesRE : /^(from|to|\d+%?)$/,
	constructor : function(a) {
		var b = this;
		a = Ext.apply(b, a || {});
		b.config = a;
		b.id = Ext.id(null, "ext-animator-");
		b.addEvents("beforeanimate", "keyframe", "afteranimate");
		b.mixins.observable.constructor.call(b, a);
		b.timeline = [];
		b.createTimeline(b.keyframes);
		if (b.target) {
			b.applyAnimator(b.target);
			Ext.fx.Manager.addAnim(b)
		}
	},
	sorter : function(d, c) {
		return d.pct - c.pct
	},
	createTimeline : function(f) {
		var j = this, m = [], k = j.to || {}, c = j.duration, n, a, e, h, l, b, d, g;
		for (l in f) {
			if (f.hasOwnProperty(l) && j.animKeyFramesRE.test(l)) {
				g = {
					attrs : Ext.apply(f[l], k)
				};
				if (l == "from") {
					l = 0
				} else {
					if (l == "to") {
						l = 100
					}
				}
				g.pct = parseInt(l, 10);
				m.push(g)
			}
		}
		Ext.Array.sort(m, j.sorter);
		h = m.length;
		for (e = 0; e < h; e++) {
			n = (m[e - 1]) ? c * (m[e - 1].pct / 100) : 0;
			a = c * (m[e].pct / 100);
			j.timeline.push({
						duration : a - n,
						attrs : m[e].attrs
					})
		}
	},
	applyAnimator : function(e) {
		var j = this, k = [], n = j.timeline, f = j.reverse, h = n.length, b, g, a, d, m, l, c;
		if (j.fireEvent("beforeanimate", j) !== false) {
			for (c = 0; c < h; c++) {
				b = n[c];
				m = b.attrs;
				g = m.easing || j.easing;
				a = m.damper || j.damper;
				delete m.easing;
				delete m.damper;
				b = Ext.create("Ext.fx.Anim", {
							target : e,
							easing : g,
							damper : a,
							duration : b.duration,
							paused : true,
							to : m
						});
				k.push(b)
			}
			j.animations = k;
			j.target = b.target;
			for (c = 0; c < h - 1; c++) {
				b = k[c];
				b.nextAnim = k[c + 1];
				b.on("afteranimate", function() {
							this.nextAnim.paused = false
						});
				b.on("afteranimate", function() {
							this.fireEvent("keyframe", this,
									++this.keyframeStep)
						}, j)
			}
			k[h - 1].on("afteranimate", function() {
						this.lastFrame()
					}, j)
		}
	},
	start : function(d) {
		var e = this, c = e.delay, b = e.delayStart, a;
		if (c) {
			if (!b) {
				e.delayStart = d;
				return
			} else {
				a = d - b;
				if (a < c) {
					return
				} else {
					d = new Date(b.getTime() + c)
				}
			}
		}
		if (e.fireEvent("beforeanimate", e) !== false) {
			e.startTime = d;
			e.running = true;
			e.animations[e.keyframeStep].paused = false
		}
	},
	lastFrame : function() {
		var c = this, a = c.iterations, b = c.currentIteration;
		b++;
		if (b < a) {
			c.startTime = new Date();
			c.currentIteration = b;
			c.keyframeStep = 0;
			c.applyAnimator(c.target);
			c.animations[c.keyframeStep].paused = false
		} else {
			c.currentIteration = 0;
			c.end()
		}
	},
	end : function() {
		var a = this;
		a.fireEvent("afteranimate", a, a.startTime, new Date() - a.startTime)
	}
});
Ext.define("Ext.fx.Anim", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	requires : ["Ext.fx.Manager", "Ext.fx.Animator", "Ext.fx.Easing",
			"Ext.fx.CubicBezier", "Ext.fx.PropertyHandler"],
	isAnimation : true,
	duration : 250,
	delay : 0,
	delayStart : 0,
	dynamic : false,
	easing : "ease",
	damper : 1,
	bezierRE : /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
	reverse : false,
	running : false,
	paused : false,
	iterations : 1,
	alternate : false,
	currentIteration : 0,
	startTime : 0,
	constructor : function(a) {
		var b = this;
		a = a || {};
		if (a.keyframes) {
			return Ext.create("Ext.fx.Animator", a)
		}
		a = Ext.apply(b, a);
		if (b.from === undefined) {
			b.from = {}
		}
		b.propHandlers = {};
		b.config = a;
		b.target = Ext.fx.Manager.createTarget(b.target);
		b.easingFn = Ext.fx.Easing[b.easing];
		b.target.dynamic = b.dynamic;
		if (!b.easingFn) {
			b.easingFn = String(b.easing).match(b.bezierRE);
			if (b.easingFn && b.easingFn.length == 5) {
				var c = b.easingFn;
				b.easingFn = Ext.fx.cubicBezier(+c[1], +c[2], +c[3], +c[4])
			}
		}
		b.id = Ext.id(null, "ext-anim-");
		Ext.fx.Manager.addAnim(b);
		b.addEvents("beforeanimate", "afteranimate", "lastframe");
		b.mixins.observable.constructor.call(b, a);
		if (a.callback) {
			b.on("afteranimate", a.callback, a.scope)
		}
		return b
	},
	setAttr : function(a, b) {
		return Ext.fx.Manager.items.get(this.id).setAttr(this.target, a, b)
	},
	initAttrs : function() {
		var e = this, g = e.from, h = e.to, f = e.initialFrom || {}, c = {}, a, b, i, d;
		for (d in h) {
			if (h.hasOwnProperty(d)) {
				a = e.target.getAttr(d, g[d]);
				b = h[d];
				if (!Ext.fx.PropertyHandler[d]) {
					if (Ext.isObject(b)) {
						i = e.propHandlers[d] = Ext.fx.PropertyHandler.object
					} else {
						i = e.propHandlers[d] = Ext.fx.PropertyHandler.defaultHandler
					}
				} else {
					i = e.propHandlers[d] = Ext.fx.PropertyHandler[d]
				}
				c[d] = i.get(a, b, e.damper, f[d], d)
			}
		}
		e.currentAttrs = c
	},
	start : function(d) {
		var e = this, c = e.delay, b = e.delayStart, a;
		if (c) {
			if (!b) {
				e.delayStart = d;
				return
			} else {
				a = d - b;
				if (a < c) {
					return
				} else {
					d = new Date(b.getTime() + c)
				}
			}
		}
		if (e.fireEvent("beforeanimate", e) !== false) {
			e.startTime = d;
			if (!e.paused && !e.currentAttrs) {
				e.initAttrs()
			}
			e.running = true
		}
	},
	runAnim : function(k) {
		var h = this, j = h.currentAttrs, d = h.duration, c = h.easingFn, b = h.propHandlers, f = {}, g, i, e, a;
		if (k >= d) {
			k = d;
			a = true
		}
		if (h.reverse) {
			k = d - k
		}
		for (e in j) {
			if (j.hasOwnProperty(e)) {
				i = j[e];
				g = a ? 1 : c(k / d);
				f[e] = b[e].set(i, g)
			}
		}
		return f
	},
	lastFrame : function() {
		var c = this, a = c.iterations, b = c.currentIteration;
		b++;
		if (b < a) {
			if (c.alternate) {
				c.reverse = !c.reverse
			}
			c.startTime = new Date();
			c.currentIteration = b;
			c.paused = false
		} else {
			c.currentIteration = 0;
			c.end();
			c.fireEvent("lastframe", c, c.startTime)
		}
	},
	end : function() {
		var a = this;
		a.startTime = 0;
		a.paused = false;
		a.running = false;
		Ext.fx.Manager.removeAnim(a);
		a.fireEvent("afteranimate", a, a.startTime)
	}
});
Ext.enableFx = true;
Ext.define("Ext.chart.Highlight", {
	requires : ["Ext.fx.Anim"],
	highlight : false,
	highlightCfg : null,
	constructor : function(a) {
		if (a.highlight) {
			if (a.highlight !== true) {
				this.highlightCfg = Ext.apply({}, a.highlight)
			} else {
				this.highlightCfg = {
					fill : "#fdd",
					radius : 20,
					lineWidth : 5,
					stroke : "#f55"
				}
			}
		}
	},
	highlightItem : function(j) {
		if (!j) {
			return
		}
		var f = this, i = j.sprite, a = f.highlightCfg, d = f.chart.surface, c = f.chart.animate, b, h, g, e;
		if (!f.highlight || !i || i._highlighted) {
			return
		}
		if (i._anim) {
			i._anim.paused = true
		}
		i._highlighted = true;
		if (!i._defaults) {
			i._defaults = Ext.apply(i._defaults || {}, i.attr);
			h = {};
			g = {};
			for (b in a) {
				if (!(b in i._defaults)) {
					i._defaults[b] = d.availableAttrs[b]
				}
				h[b] = i._defaults[b];
				g[b] = a[b];
				if (Ext.isObject(a[b])) {
					h[b] = {};
					g[b] = {};
					Ext.apply(i._defaults[b], i.attr[b]);
					Ext.apply(h[b], i._defaults[b]);
					for (e in i._defaults[b]) {
						if (!(e in a[b])) {
							g[b][e] = h[b][e]
						} else {
							g[b][e] = a[b][e]
						}
					}
					for (e in a[b]) {
						if (!(e in g[b])) {
							g[b][e] = a[b][e]
						}
					}
				}
			}
			i._from = h;
			i._to = g
		}
		if (c) {
			i._anim = Ext.create("Ext.fx.Anim", {
						target : i,
						from : i._from,
						to : i._to,
						duration : 150
					})
		} else {
			i.setAttributes(i._to, true)
		}
	},
	unHighlightItem : function() {
		if (!this.highlight || !this.items) {
			return
		}
		var h = this, g = h.items, f = g.length, a = h.highlightCfg, c = h.chart.animate, e = 0, d, b, j;
		for (; e < f; e++) {
			if (!g[e]) {
				continue
			}
			j = g[e].sprite;
			if (j && j._highlighted) {
				if (j._anim) {
					j._anim.paused = true
				}
				d = {};
				for (b in a) {
					if (Ext.isObject(j._defaults[b])) {
						d[b] = {};
						Ext.apply(d[b], j._defaults[b])
					} else {
						d[b] = j._defaults[b]
					}
				}
				if (c) {
					j._anim = Ext.create("Ext.fx.Anim", {
								target : j,
								to : d,
								duration : 150
							})
				} else {
					j.setAttributes(d, true)
				}
				delete j._highlighted
			}
		}
	},
	cleanHighlights : function() {
		if (!this.highlight) {
			return
		}
		var d = this.group, c = this.markerGroup, b = 0, a;
		for (a = d.getCount(); b < a; b++) {
			delete d.getAt(b)._defaults
		}
		if (c) {
			for (a = c.getCount(); b < a; b++) {
				delete c.getAt(b)._defaults
			}
		}
	}
});
Ext.define("Ext.layout.component.Tip", {
			alias : ["layout.tip"],
			extend : "Ext.layout.component.Dock",
			type : "tip",
			onLayout : function(b, i) {
				var g = this, c = g.owner, d = c.el, a, h, f, e, j = d.getXY();
				d.setXY([-9999, -9999]);
				this.callParent(arguments);
				if (!Ext.isNumber(b)) {
					a = c.minWidth;
					h = c.maxWidth;
					if (Ext.isStrict && (Ext.isIE6 || Ext.isIE7)) {
						e = g.doAutoWidth()
					} else {
						f = d.getWidth()
					}
					if (f < a) {
						e = a
					} else {
						if (f > h) {
							e = h
						}
					}
					if (e) {
						this.callParent([e, i])
					}
				}
				d.setXY(j)
			},
			doAutoWidth : function() {
				var d = this, b = d.owner, a = b.body, c = a.getTextWidth();
				if (b.header) {
					c = Math.max(c, b.header.getWidth())
				}
				if (!Ext.isDefined(d.frameWidth)) {
					d.frameWidth = b.el.getWidth() - a.getWidth()
				}
				c += d.frameWidth + a.getPadding("lr");
				return c
			}
		});
Ext.define("Ext.layout.component.Tab", {
			alias : ["layout.tab"],
			extend : "Ext.layout.component.Button",
			beforeLayout : function() {
				var b = this, a = b.lastClosable !== b.owner.closable;
				if (a) {
					delete b.adjWidth
				}
				return this.callParent(arguments) || a
			},
			onLayout : function() {
				var a = this;
				a.callParent(arguments);
				a.lastClosable = a.owner.closable
			}
		});
Ext.define("Ext.selection.Model", {
	extend : "Ext.util.Observable",
	alternateClassName : "Ext.AbstractStoreSelectionModel",
	requires : ["Ext.data.StoreManager"],
	allowDeselect : false,
	selected : null,
	pruneRemoved : true,
	constructor : function(a) {
		var b = this;
		a = a || {};
		Ext.apply(b, a);
		b.addEvents("selectionchange");
		b.modes = {
			SINGLE : true,
			SIMPLE : true,
			MULTI : true
		};
		b.setSelectionMode(a.mode || b.mode);
		b.selected = Ext.create("Ext.util.MixedCollection");
		b.callParent(arguments)
	},
	bind : function(a, b) {
		var c = this;
		if (!b && c.store) {
			if (a !== c.store && c.store.autoDestroy) {
				c.store.destroy()
			} else {
				c.store.un("add", c.onStoreAdd, c);
				c.store.un("clear", c.onStoreClear, c);
				c.store.un("remove", c.onStoreRemove, c);
				c.store.un("update", c.onStoreUpdate, c)
			}
		}
		if (a) {
			a = Ext.data.StoreManager.lookup(a);
			a.on({
						add : c.onStoreAdd,
						clear : c.onStoreClear,
						remove : c.onStoreRemove,
						update : c.onStoreUpdate,
						scope : c
					})
		}
		c.store = a;
		if (a && !b) {
			c.refresh()
		}
	},
	selectAll : function(b) {
		var d = this.store.getRange(), c = 0, a = d.length;
		for (; c < a; c++) {
			this.doSelect(d[c], true, b)
		}
	},
	deselectAll : function() {
		var c = this.getSelection(), b = 0, a = c.length;
		for (; b < a; b++) {
			this.doDeselect(c[b])
		}
	},
	selectWithEvent : function(a, c) {
		var b = this;
		switch (b.selectionMode) {
			case "MULTI" :
				if (c.ctrlKey && b.isSelected(a)) {
					b.doDeselect(a, false)
				} else {
					if (c.shiftKey && b.lastFocused) {
						b.selectRange(b.lastFocused, a, c.ctrlKey)
					} else {
						if (c.ctrlKey) {
							b.doSelect(a, true, false)
						} else {
							if (b.isSelected(a) && !c.shiftKey && !c.ctrlKey
									&& b.selected.getCount() > 1) {
								b.doSelect(a, false, false)
							} else {
								b.doSelect(a, false)
							}
						}
					}
				}
				break;
			case "SIMPLE" :
				if (b.isSelected(a)) {
					b.doDeselect(a)
				} else {
					b.doSelect(a, true)
				}
				break;
			case "SINGLE" :
				if (b.allowDeselect && b.isSelected(a)) {
					b.doDeselect(a)
				} else {
					b.doSelect(a, false)
				}
				break
		}
	},
	selectRange : function(k, e, l, c) {
		var h = this, j = h.store, d = 0, g, f, a, b = [];
		if (h.isLocked()) {
			return
		}
		if (!l) {
			h.clearSelections()
		}
		if (!Ext.isNumber(k)) {
			k = j.indexOf(k)
		}
		if (!Ext.isNumber(e)) {
			e = j.indexOf(e)
		}
		if (k > e) {
			f = e;
			e = k;
			k = f
		}
		for (g = k; g <= e; g++) {
			if (h.isSelected(j.getAt(g))) {
				d++
			}
		}
		if (!c) {
			a = -1
		} else {
			a = (c == "up") ? k : e
		}
		for (g = k; g <= e; g++) {
			if (d == (e - k + 1)) {
				if (g != a) {
					h.doDeselect(g, true)
				}
			} else {
				b.push(j.getAt(g))
			}
		}
		h.doMultiSelect(b, true)
	},
	select : function(b, c, a) {
		this.doSelect(b, c, a)
	},
	deselect : function(b, a) {
		this.doDeselect(b, a)
	},
	doSelect : function(c, e, b) {
		var d = this, a;
		if (d.locked) {
			return
		}
		if (typeof c === "number") {
			c = [d.store.getAt(c)]
		}
		if (d.selectionMode == "SINGLE" && c) {
			a = c.length ? c[0] : c;
			d.doSingleSelect(a, b)
		} else {
			d.doMultiSelect(c, e, b)
		}
	},
	doMultiSelect : function(a, j, h) {
		var f = this, b = f.selected, g = false, c = 0, e, d;
		if (f.locked) {
			return
		}
		a = !Ext.isArray(a) ? [a] : a;
		e = a.length;
		if (!j && b.getCount() > 0) {
			g = true;
			f.doDeselect(f.getSelection(), true)
		}
		for (; c < e; c++) {
			d = a[c];
			if (j && f.isSelected(d)) {
				continue
			}
			g = true;
			f.lastSelected = d;
			b.add(d);
			f.onSelectChange(d, true, h)
		}
		f.setLastFocused(d, h);
		f.maybeFireSelectionChange(g && !h)
	},
	doDeselect : function(d, c) {
		var g = this, f = g.selected, h = false, e = 0, a, b;
		if (g.locked) {
			return
		}
		if (typeof d === "number") {
			d = [g.store.getAt(d)]
		}
		d = !Ext.isArray(d) ? [d] : d;
		a = d.length;
		for (; e < a; e++) {
			b = d[e];
			if (f.remove(b)) {
				if (g.lastSelected == b) {
					g.lastSelected = f.last()
				}
				g.onSelectChange(b, false, c);
				h = true
			}
		}
		g.maybeFireSelectionChange(h && !c)
	},
	doSingleSelect : function(a, b) {
		var d = this, c = d.selected;
		if (d.locked) {
			return
		}
		if (d.isSelected(a)) {
			return
		}
		if (c.getCount() > 0) {
			d.doDeselect(d.lastSelected, b)
		}
		c.add(a);
		d.lastSelected = a;
		d.onSelectChange(a, true, b);
		if (!b) {
			d.setLastFocused(a)
		}
		d.maybeFireSelectionChange(!b)
	},
	setLastFocused : function(c, b) {
		var d = this, a = d.lastFocused;
		d.lastFocused = c;
		d.onLastFocusChanged(a, c, b)
	},
	isFocused : function(a) {
		return a === this.getLastFocused()
	},
	maybeFireSelectionChange : function(a) {
		if (a) {
			var b = this;
			b.fireEvent("selectionchange", b, b.getSelection())
		}
	},
	getLastSelected : function() {
		return this.lastSelected
	},
	getLastFocused : function() {
		return this.lastFocused
	},
	getSelection : function() {
		return this.selected.getRange()
	},
	getSelectionMode : function() {
		return this.selectionMode
	},
	setSelectionMode : function(a) {
		a = a ? a.toUpperCase() : "SINGLE";
		this.selectionMode = this.modes[a] ? a : "SINGLE"
	},
	isLocked : function() {
		return this.locked
	},
	setLocked : function(a) {
		this.locked = !!a
	},
	isSelected : function(a) {
		a = Ext.isNumber(a) ? this.store.getAt(a) : a;
		return this.selected.indexOf(a) !== -1
	},
	hasSelection : function() {
		return this.selected.getCount() > 0
	},
	refresh : function() {
		var g = this, b = [], f = g.getSelection(), a = f.length, e, h, d = 0, c = this
				.getLastFocused();
		for (; d < a; d++) {
			e = f[d];
			if (!this.pruneRemoved || g.store.indexOf(e) !== -1) {
				b.push(e)
			}
		}
		if (g.selected.getCount() != b.length) {
			h = true
		}
		g.clearSelections();
		if (g.store.indexOf(c) !== -1) {
			this.setLastFocused(c, true)
		}
		if (b.length) {
			g.doSelect(b, false, true)
		}
		g.maybeFireSelectionChange(h)
	},
	clearSelections : function() {
		var a = this;
		a.selected.clear();
		a.lastSelected = null;
		a.setLastFocused(null)
	},
	onStoreAdd : function() {
	},
	onStoreClear : function() {
		var b = this, a = this.selected;
		if (a.getCount > 0) {
			a.clear();
			b.lastSelected = null;
			b.setLastFocused(null);
			b.maybeFireSelectionChange(true)
		}
	},
	onStoreRemove : function(b, a) {
		var d = this, c = d.selected;
		if (d.locked || !d.pruneRemoved) {
			return
		}
		if (c.remove(a)) {
			if (d.lastSelected == a) {
				d.lastSelected = null
			}
			if (d.getLastFocused() == a) {
				d.setLastFocused(null)
			}
			d.maybeFireSelectionChange(true)
		}
	},
	getCount : function() {
		return this.selected.getCount()
	},
	destroy : function() {
	},
	onStoreUpdate : function() {
	},
	onSelectChange : function(a, c, b) {
	},
	onLastFocusChanged : function(b, a) {
	},
	onEditorKey : function(b, a) {
	},
	bindComponent : function(a) {
	}
});
Ext.define("Ext.selection.RowModel", {
	extend : "Ext.selection.Model",
	alias : "selection.rowmodel",
	requires : ["Ext.util.KeyNav"],
	deltaScroll : 5,
	enableKeyNav : true,
	constructor : function() {
		this.addEvents("deselect", "select");
		this.callParent(arguments)
	},
	bindComponent : function(a) {
		var b = this;
		b.views = b.views || [];
		b.views.push(a);
		b.bind(a.getStore(), true);
		a.on({
					itemmousedown : b.onRowMouseDown,
					scope : b
				});
		if (b.enableKeyNav) {
			b.initKeyNav(a)
		}
	},
	initKeyNav : function(a) {
		var b = this;
		if (!a.rendered) {
			a.on("render", Ext.Function.bind(b.initKeyNav, b, [a], 0), b, {
						single : true
					});
			return
		}
		a.el.set({
					tabIndex : -1
				});
		b.keyNav = new Ext.util.KeyNav(a.el, {
					up : b.onKeyUp,
					down : b.onKeyDown,
					right : b.onKeyRight,
					left : b.onKeyLeft,
					pageDown : b.onKeyPageDown,
					pageUp : b.onKeyPageUp,
					home : b.onKeyHome,
					end : b.onKeyEnd,
					scope : b
				});
		a.el.on(Ext.EventManager.getKeyEvent(), b.onKeyPress, b)
	},
	getRowsVisible : function() {
		var e = false, a = this.views[0], d = a.getNode(0), b, c;
		if (d) {
			b = Ext.fly(d).getHeight();
			c = a.el.getHeight();
			e = Math.floor(c / b)
		}
		return e
	},
	onKeyEnd : function(d, a) {
		var c = this, b = c.store.getAt(c.store.getCount() - 1);
		if (b) {
			if (d.shiftKey) {
				c.selectRange(b, c.lastFocused || 0);
				c.setLastFocused(b)
			} else {
				if (d.ctrlKey) {
					c.setLastFocused(b)
				} else {
					c.doSelect(b)
				}
			}
		}
	},
	onKeyHome : function(c, a) {
		var b = this, d = b.store.getAt(0);
		if (d) {
			if (c.shiftKey) {
				b.selectRange(d, b.lastFocused || 0);
				b.setLastFocused(d)
			} else {
				if (c.ctrlKey) {
					b.setLastFocused(d)
				} else {
					b.doSelect(d, false)
				}
			}
		}
	},
	onKeyPageUp : function(h, d) {
		var g = this, i = g.getRowsVisible(), b, c, a, f;
		if (i) {
			b = g.lastFocused ? g.store.indexOf(g.lastFocused) : 0;
			c = b - i;
			if (c < 0) {
				c = 0
			}
			a = g.store.getAt(c);
			if (h.shiftKey) {
				f = g.store.getAt(b);
				g.selectRange(a, f, h.ctrlKey, "up");
				g.setLastFocused(a)
			} else {
				if (h.ctrlKey) {
					h.preventDefault();
					g.setLastFocused(a)
				} else {
					g.doSelect(a)
				}
			}
		}
	},
	onKeyPageDown : function(h, b) {
		var f = this, i = f.getRowsVisible(), a, g, d, c;
		if (i) {
			a = f.lastFocused ? f.store.indexOf(f.lastFocused) : 0;
			g = a + i;
			if (g >= f.store.getCount()) {
				g = f.store.getCount() - 1
			}
			d = f.store.getAt(g);
			if (h.shiftKey) {
				c = f.store.getAt(a);
				f.selectRange(d, c, h.ctrlKey, "down");
				f.setLastFocused(d)
			} else {
				if (h.ctrlKey) {
					h.preventDefault();
					f.setLastFocused(d)
				} else {
					f.doSelect(d)
				}
			}
		}
	},
	onKeyPress : function(d, b) {
		if (d.getKey() === d.SPACE) {
			d.stopEvent();
			var c = this, a = c.lastFocused;
			if (a) {
				if (c.isSelected(a)) {
					c.doDeselect(a, false)
				} else {
					c.doSelect(a, true)
				}
			}
		}
	},
	onKeyUp : function(g, d) {
		var f = this, c = f.views[0], a = f.store.indexOf(f.lastFocused), b;
		if (a > 0) {
			b = f.store.getAt(a - 1);
			if (g.shiftKey && f.lastFocused) {
				if (f.isSelected(f.lastFocused) && f.isSelected(b)) {
					f.doDeselect(f.lastFocused, true);
					f.setLastFocused(b)
				} else {
					if (!f.isSelected(f.lastFocused)) {
						f.doSelect(f.lastFocused, true);
						f.doSelect(b, true)
					} else {
						f.doSelect(b, true)
					}
				}
			} else {
				if (g.ctrlKey) {
					f.setLastFocused(b)
				} else {
					f.doSelect(b)
				}
			}
		}
	},
	onKeyDown : function(g, d) {
		var f = this, c = f.views[0], a = f.store.indexOf(f.lastFocused), b;
		if (a + 1 < f.store.getCount()) {
			b = f.store.getAt(a + 1);
			if (f.selected.getCount() === 0) {
				f.doSelect(b)
			} else {
				if (g.shiftKey && f.lastFocused) {
					if (f.isSelected(f.lastFocused) && f.isSelected(b)) {
						f.doDeselect(f.lastFocused, true);
						f.setLastFocused(b)
					} else {
						if (!f.isSelected(f.lastFocused)) {
							f.doSelect(f.lastFocused, true);
							f.doSelect(b, true)
						} else {
							f.doSelect(b, true)
						}
					}
				} else {
					if (g.ctrlKey) {
						f.setLastFocused(b)
					} else {
						f.doSelect(b)
					}
				}
			}
		}
	},
	scrollByDeltaX : function(d) {
		var a = this.views[0], c = a.up(), b = c.horizontalScroller;
		if (b) {
			b.scrollByDeltaX(d)
		}
	},
	onKeyLeft : function(b, a) {
		this.scrollByDeltaX(-this.deltaScroll)
	},
	onKeyRight : function(b, a) {
		this.scrollByDeltaX(this.deltaScroll)
	},
	onRowMouseDown : function(b, a, d, c, f) {
		b.el.focus();
		this.selectWithEvent(a, f)
	},
	onSelectChange : function(e, b, h) {
		var f = this, j = f.views, c = j.length, g = f.store, a = g.indexOf(e), d = 0;
		for (; d < c; d++) {
			if (b) {
				j[d].onRowSelect(a, h);
				if (!h) {
					f.fireEvent("select", f, e, a)
				}
			} else {
				j[d].onRowDeselect(a, h);
				if (!h) {
					f.fireEvent("deselect", f, e, a)
				}
			}
		}
	},
	onLastFocusChanged : function(h, d, b) {
		var a = this.views, g = a.length, c = this.store, f, e = 0;
		if (h) {
			f = c.indexOf(h);
			if (f != -1) {
				for (; e < g; e++) {
					a[e].onRowFocus(f, false)
				}
			}
		}
		if (d) {
			f = c.indexOf(d);
			if (f != -1) {
				for (e = 0; e < g; e++) {
					a[e].onRowFocus(f, true, b)
				}
			}
		}
	},
	onEditorTab : function(h, f) {
		var g = this, i = g.views[0], c = h.getActiveRecord(), b = h
				.getActiveColumn(), d = i.getPosition(c, b), j = f.shiftKey
				? "left"
				: "right", a = i.walkCells(d, j, f, this.preventWrap);
		if (a) {
			h.startEditByPosition(a)
		}
	},
	selectByPosition : function(a) {
		var b = this.store.getAt(a.row);
		this.select(b)
	}
});
Ext.define("Ext.selection.TreeModel", {
	extend : "Ext.selection.RowModel",
	alias : "selection.treemodel",
	pruneRemoved : false,
	onKeyRight : function(d, b) {
		var c = this.getLastFocused(), a = this.view;
		if (c) {
			if (c.isExpanded()) {
				this.onKeyDown(d, b)
			} else {
				if (!c.isLeaf()) {
					a.expand(c)
				}
			}
		}
	},
	onKeyLeft : function(h, d) {
		var g = this.getLastFocused(), c = this.view, b = c.getSelectionModel(), a, f;
		if (g) {
			a = g.parentNode;
			if (g.isExpanded()) {
				c.collapse(g)
			} else {
				if (a && !a.isRoot()) {
					if (h.shiftKey) {
						b.selectRange(a, g, h.ctrlKey, "up");
						b.setLastFocused(a)
					} else {
						if (h.ctrlKey) {
							b.setLastFocused(a)
						} else {
							b.select(a)
						}
					}
				}
			}
		}
	},
	onKeyPress : function(d, a) {
		var b, c;
		if (d.getKey() === d.SPACE || d.getKey() === d.ENTER) {
			d.stopEvent();
			b = this.getLastSelected();
			if (b && b.isLeaf()) {
				c = b.get("checked");
				if (Ext.isBoolean(c)) {
					b.set("checked", !c)
				}
			}
		} else {
			this.callParent(arguments)
		}
	}
});
Ext.define("Ext.state.Manager", {
			singleton : true,
			requires : ["Ext.state.Provider"],
			constructor : function() {
				this.provider = Ext.create("Ext.state.Provider")
			},
			setProvider : function(a) {
				this.provider = a
			},
			get : function(b, a) {
				return this.provider.get(b, a)
			},
			set : function(a, b) {
				this.provider.set(a, b)
			},
			clear : function(a) {
				this.provider.clear(a)
			},
			getProvider : function() {
				return this.provider
			}
		});
Ext.define("Ext.state.Stateful", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			requires : ["Ext.state.Manager"],
			stateful : true,
			saveDelay : 100,
			autoGenIdRe : /^((\w+-)|(ext-comp-))\d{4,}$/i,
			constructor : function(a) {
				var b = this;
				a = a || {};
				if (Ext.isDefined(a.stateful)) {
					b.stateful = a.stateful
				}
				if (Ext.isDefined(a.saveDelay)) {
					b.saveDelay = a.saveDelay
				}
				b.stateId = a.stateId;
				if (!b.stateEvents) {
					b.stateEvents = []
				}
				if (a.stateEvents) {
					b.stateEvents.concat(a.stateEvents)
				}
				this.addEvents("beforestaterestore", "staterestore",
						"beforestatesave", "statesave");
				b.mixins.observable.constructor.call(b);
				if (b.stateful !== false) {
					b.initStateEvents();
					b.initState()
				}
			},
			initStateEvents : function() {
				this.addStateEvents(this.stateEvents)
			},
			addStateEvents : function(c) {
				if (!Ext.isArray(c)) {
					c = [c]
				}
				var d = this, b = 0, a = c.length;
				for (; b < a; ++b) {
					d.on(c[b], d.onStateChange, d)
				}
			},
			onStateChange : function() {
				var b = this, a = b.saveDelay;
				if (a > 0) {
					if (!b.stateTask) {
						b.stateTask = Ext.create("Ext.util.DelayedTask",
								b.saveState, b)
					}
					b.stateTask.delay(b.saveDelay)
				} else {
					b.saveState()
				}
			},
			saveState : function() {
				var a = this, c, b;
				if (a.stateful !== false) {
					c = a.getStateId();
					if (c) {
						b = a.getState();
						if (a.fireEvent("beforestatesave", a, b) !== false) {
							Ext.state.Manager.set(c, b);
							a.fireEvent("statesave", a, b)
						}
					}
				}
			},
			getState : function() {
				return null
			},
			applyState : function(a) {
				if (a) {
					Ext.apply(this, a)
				}
			},
			getStateId : function() {
				var a = this, b = a.stateId;
				if (!b) {
					b = a.autoGenIdRe.test(String(a.id)) ? null : a.id
				}
				return b
			},
			initState : function() {
				var a = this, c = a.getStateId(), b;
				if (a.stateful !== false) {
					if (c) {
						b = Ext.state.Manager.get(c);
						if (b) {
							b = Ext.apply({}, b);
							if (a.fireEvent("beforestaterestore", a, b) !== false) {
								a.applyState(b);
								a.fireEvent("staterestore", a, b)
							}
						}
					}
				}
			},
			destroy : function() {
				var a = this.stateTask;
				if (a) {
					a.cancel()
				}
				this.clearListeners()
			}
		});
Ext.define("Ext.AbstractComponent", {
	mixins : {
		observable : "Ext.util.Observable",
		animate : "Ext.util.Animate",
		state : "Ext.state.Stateful"
	},
	requires : ["Ext.PluginManager", "Ext.ComponentManager",
			"Ext.core.Element", "Ext.core.DomHelper", "Ext.XTemplate",
			"Ext.ComponentQuery", "Ext.LoadMask", "Ext.ComponentLoader",
			"Ext.EventManager", "Ext.layout.Layout",
			"Ext.layout.component.Auto"],
	uses : ["Ext.ZIndexManager"],
	statics : {
		AUTO_ID : 1000
	},
	isComponent : true,
	getAutoId : function() {
		return ++Ext.AbstractComponent.AUTO_ID
	},
	renderTpl : null,
	tplWriteMode : "overwrite",
	baseCls : Ext.baseCSSPrefix + "component",
	disabledCls : Ext.baseCSSPrefix + "item-disabled",
	ui : "default",
	uiCls : [],
	hidden : false,
	disabled : false,
	draggable : false,
	floating : false,
	hideMode : "display",
	styleHtmlContent : false,
	styleHtmlCls : Ext.baseCSSPrefix + "html",
	allowDomMove : true,
	autoShow : false,
	autoRender : false,
	needsLayout : false,
	rendered : false,
	weight : 0,
	trimRe : /^\s+|\s+$/g,
	spacesRe : /\s+/,
	maskOnDisable : true,
	constructor : function(b) {
		var d = this, c, a;
		b = b || {};
		d.initialConfig = b;
		Ext.apply(d, b);
		d.addEvents("beforeactivate", "activate", "beforedeactivate",
				"deactivate", "added", "disable", "enable", "beforeshow",
				"show", "beforehide", "hide", "removed", "beforerender",
				"render", "afterrender", "beforedestroy", "destroy", "resize",
				"move");
		d.getId();
		d.mons = [];
		d.additionalCls = [];
		d.renderData = d.renderData || {};
		d.renderSelectors = d.renderSelectors || {};
		if (d.plugins) {
			d.plugins = [].concat(d.plugins);
			for (c = 0, a = d.plugins.length; c < a; c++) {
				d.plugins[c] = d.constructPlugin(d.plugins[c])
			}
		}
		d.initComponent();
		Ext.ComponentManager.register(d);
		d.mixins.observable.constructor.call(d);
		d.mixins.state.constructor.call(d, b);
		if (d.plugins) {
			d.plugins = [].concat(d.plugins);
			for (c = 0, a = d.plugins.length; c < a; c++) {
				d.plugins[c] = d.initPlugin(d.plugins[c])
			}
		}
		d.loader = d.getLoader();
		if (d.renderTo) {
			d.render(d.renderTo)
		}
		if (d.autoShow) {
			d.show()
		}
	},
	initComponent : Ext.emptyFn,
	show : Ext.emptyFn,
	animate : function(b) {
		var f = this, j;
		b = b || {};
		j = b.to || {};
		if (Ext.fx.Manager.hasFxBlock(f.id)) {
			return f
		}
		if (!b.dynamic && (j.height || j.width)) {
			var e = f.getWidth(), k = e, d = f.getHeight(), c = d, a = false;
			if (j.height && j.height > d) {
				c = j.height;
				a = true
			}
			if (j.width && j.width > e) {
				k = j.width;
				a = true
			}
			if (a) {
				var i = !Ext.isNumber(f.width), g = !Ext.isNumber(f.height);
				f.componentLayout.childrenChanged = true;
				f.setSize(k, c, f.ownerCt);
				f.el.setSize(e, d);
				if (i) {
					delete f.width
				}
				if (g) {
					delete f.height
				}
			}
		}
		return f.mixins.animate.animate.apply(f, arguments)
	},
	findLayoutController : function() {
		return this.findParentBy(function(a) {
					return !a.ownerCt
							|| (a.layout.layoutBusy && !a.ownerCt.layout.layoutBusy)
				})
	},
	onShow : function() {
		var a = this.needsLayout;
		if (Ext.isObject(a)) {
			this.doComponentLayout(a.width, a.height, a.isSetSize, a.ownerCt)
		}
	},
	constructPlugin : function(a) {
		if (a.ptype && typeof a.init != "function") {
			a.cmp = this;
			a = Ext.PluginManager.create(a)
		} else {
			if (typeof a == "string") {
				a = Ext.PluginManager.create({
							ptype : a,
							cmp : this
						})
			}
		}
		return a
	},
	initPlugin : function(a) {
		a.init(this);
		return a
	},
	doAutoRender : function() {
		var a = this;
		if (a.floating) {
			a.render(document.body)
		} else {
			a
					.render(Ext.isBoolean(a.autoRender)
							? Ext.getBody()
							: a.autoRender)
		}
	},
	render : function(b, a) {
		var c = this;
		if (!c.rendered && c.fireEvent("beforerender", c) !== false) {
			if (c.el) {
				c.el = Ext.get(c.el)
			}
			if (c.floating) {
				c.onFloatRender()
			}
			b = c.initContainer(b);
			c.onRender(b, a);
			c.el.setVisibilityMode(Ext.core.Element[c.hideMode.toUpperCase()]);
			if (c.overCls) {
				c.el.hover(c.addOverCls, c.removeOverCls, c)
			}
			c.fireEvent("render", c);
			c.initContent();
			c.afterRender(b);
			c.fireEvent("afterrender", c);
			c.initEvents();
			if (c.hidden) {
				c.el.hide()
			}
			if (c.disabled) {
				c.disable(true)
			}
		}
		return c
	},
	onRender : function(a, d) {
		var f = this, b = f.el, j = f.initCls(), h = f.initStyles(), e, g, c;
		d = f.getInsertPosition(d);
		if (!b) {
			if (d) {
				b = Ext.core.DomHelper.insertBefore(d, f.getElConfig(), true)
			} else {
				b = Ext.core.DomHelper.append(a, f.getElConfig(), true)
			}
		} else {
			if (f.allowDomMove !== false) {
				if (d) {
					a.dom.insertBefore(b.dom, d)
				} else {
					a.dom.appendChild(b.dom)
				}
			}
		}
		if (Ext.scopeResetCSS && !f.ownerCt) {
			if (b.dom == Ext.getBody().dom) {
				b.parent().addCls(Ext.baseCSSPrefix + "reset")
			} else {
				f.resetEl = b.wrap({
							cls : Ext.baseCSSPrefix + "reset"
						})
			}
		}
		b.addCls(j);
		b.setStyle(h);
		f.el = b;
		f.rendered = true;
		f.addUIToElement(true);
		for (c = 0; c < f.uiCls.length; c++) {
			f.addUIClsToElement(f.uiCls[c], true)
		}
		f.rendered = false;
		f.initFrame();
		e = f.initRenderTpl();
		if (e) {
			g = f.initRenderData();
			e.append(f.getTargetEl(), g)
		}
		f.applyRenderSelectors();
		f.rendered = true;
		f.setUI(f.ui)
	},
	afterRender : function() {
		var a = this, c, b;
		a.getComponentLayout();
		if (!a.ownerCt || (a.height || a.width)) {
			a.setSize(a.width, a.height)
		}
		if (a.floating && (a.x === undefined || a.y === undefined)) {
			if (a.floatParent) {
				b = a.el.getAlignToXY(a.floatParent.getTargetEl(), "c-c");
				c = a.floatParent.getTargetEl().translatePoints(b[0], b[1])
			} else {
				b = a.el.getAlignToXY(a.container, "c-c");
				c = a.container.translatePoints(b[0], b[1])
			}
			a.x = a.x === undefined ? c.left : a.x;
			a.y = a.y === undefined ? c.top : a.y
		}
		if (Ext.isDefined(a.x) || Ext.isDefined(a.y)) {
			a.setPosition(a.x, a.y)
		}
		if (a.styleHtmlContent) {
			a.getTargetEl().addCls(a.styleHtmlCls)
		}
	},
	frameCls : Ext.baseCSSPrefix + "frame",
	frameTpl : [
			'<tpl if="top">',
			'<tpl if="left"><div class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>',
			'<tpl if="right"><div class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>',
			'<div class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>',
			'<tpl if="right"></div></tpl>',
			'<tpl if="left"></div></tpl>',
			"</tpl>",
			'<tpl if="left"><div class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>',
			'<tpl if="right"><div class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>',
			'<div class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" role="presentation"></div>',
			'<tpl if="right"></div></tpl>',
			'<tpl if="left"></div></tpl>',
			'<tpl if="bottom">',
			'<tpl if="left"><div class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>',
			'<tpl if="right"><div class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>',
			'<div class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>',
			'<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>',
			"</tpl>"],
	frameTableTpl : [
			"<table><tbody>",
			'<tpl if="top">',
			"<tr>",
			'<tpl if="left"><td class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>',
			'<td class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>',
			'<tpl if="right"><td class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
			"</tr>",
			"</tpl>",
			"<tr>",
			'<tpl if="left"><td class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
			'<td class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" style="background-position: 0 0;" role="presentation"></td>',
			'<tpl if="right"><td class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
			"</tr>",
			'<tpl if="bottom">',
			"<tr>",
			'<tpl if="left"><td class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
			'<td class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>',
			'<tpl if="right"><td class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
			"</tr>", "</tpl>", "</tbody></table>"],
	initFrame : function() {
		if (Ext.supports.CSS3BorderRadius) {
			return false
		}
		var d = this, c = d.getFrameInfo(), b = c.width, a = d
				.getFrameTpl(c.table);
		if (d.frame) {
			a.insertFirst(d.el, Ext.apply({}, {
								ui : d.ui,
								uiCls : d.uiCls,
								frameCls : d.frameCls,
								baseCls : d.baseCls,
								frameWidth : b,
								top : !!c.top,
								left : !!c.left,
								right : !!c.right,
								bottom : !!c.bottom
							}, d.getFramePositions(c)));
			d.frameBody = d.el.down("." + d.frameCls + "-mc");
			Ext.apply(d.renderSelectors, {
						frameTL : "." + d.baseCls + "-tl",
						frameTC : "." + d.baseCls + "-tc",
						frameTR : "." + d.baseCls + "-tr",
						frameML : "." + d.baseCls + "-ml",
						frameMC : "." + d.baseCls + "-mc",
						frameMR : "." + d.baseCls + "-mr",
						frameBL : "." + d.baseCls + "-bl",
						frameBC : "." + d.baseCls + "-bc",
						frameBR : "." + d.baseCls + "-br"
					})
		}
	},
	updateFrame : function() {
		if (Ext.supports.CSS3BorderRadius) {
			return false
		}
		var e = this, g = this.frameSize && this.frameSize.table, f = this.frameTL, d = this.frameBL, c = this.frameML, a = this.frameMC, b;
		this.initFrame();
		if (a) {
			if (e.frame) {
				delete e.frameTL;
				delete e.frameTC;
				delete e.frameTR;
				delete e.frameML;
				delete e.frameMC;
				delete e.frameMR;
				delete e.frameBL;
				delete e.frameBC;
				delete e.frameBR;
				this.applyRenderSelectors();
				b = this.frameMC.dom.className;
				a.insertAfter(this.frameMC);
				this.frameMC.remove();
				this.frameBody = this.frameMC = a;
				a.dom.className = b;
				if (g) {
					e.el.query("> table")[1].remove()
				} else {
					if (f) {
						f.remove()
					}
					if (d) {
						d.remove()
					}
					c.remove()
				}
			} else {
			}
		} else {
			if (e.frame) {
				this.applyRenderSelectors()
			}
		}
	},
	getFrameInfo : function() {
		if (Ext.supports.CSS3BorderRadius) {
			return false
		}
		var c = this, f = c.el.getStyle("background-position-x"), e = c.el
				.getStyle("background-position-y"), d, b = false, a;
		if (!f && !e) {
			d = c.el.getStyle("background-position").split(" ");
			f = d[0];
			e = d[1]
		}
		if (parseInt(f, 10) >= 1000000 && parseInt(e, 10) >= 1000000) {
			a = Math.max;
			b = {
				table : f.substr(0, 3) == "110",
				vertical : e.substr(0, 3) == "110",
				top : a(f.substr(3, 2), f.substr(5, 2)),
				right : a(f.substr(5, 2), e.substr(3, 2)),
				bottom : a(e.substr(3, 2), e.substr(5, 2)),
				left : a(e.substr(5, 2), f.substr(3, 2))
			};
			b.width = a(b.top, b.right, b.bottom, b.left);
			c.el.setStyle("background-image", "none")
		}
		if (c.frame === true && !b) {
		}
		c.frame = c.frame || !!b;
		c.frameSize = b || false;
		return b
	},
	getFramePositions : function(e) {
		var g = this, h = e.width, i = g.dock, d, b, f, c, a;
		if (e.vertical) {
			b = "0 -" + (h * 0) + "px";
			f = "0 -" + (h * 1) + "px";
			if (i && i == "right") {
				b = "right -" + (h * 0) + "px";
				f = "right -" + (h * 1) + "px"
			}
			d = {
				tl : "0 -" + (h * 0) + "px",
				tr : "0 -" + (h * 1) + "px",
				bl : "0 -" + (h * 2) + "px",
				br : "0 -" + (h * 3) + "px",
				ml : "-" + (h * 1) + "px 0",
				mr : "right 0",
				tc : b,
				bc : f
			}
		} else {
			c = "-" + (h * 0) + "px 0";
			a = "right 0";
			if (i && i == "bottom") {
				c = "left bottom";
				a = "right bottom"
			}
			d = {
				tl : "0 -" + (h * 2) + "px",
				tr : "right -" + (h * 3) + "px",
				bl : "0 -" + (h * 4) + "px",
				br : "right -" + (h * 5) + "px",
				ml : c,
				mr : a,
				tc : "0 -" + (h * 0) + "px",
				bc : "0 -" + (h * 1) + "px"
			}
		}
		return d
	},
	getFrameTpl : function(a) {
		return a ? this.getTpl("frameTableTpl") : this.getTpl("frameTpl")
	},
	initCls : function() {
		var b = this, a = [];
		a.push(b.baseCls);
		if (Ext.isDefined(b.cmpCls)) {
			if (Ext.isDefined(Ext.global.console)) {
				Ext.global.console
						.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")
			}
			b.componentCls = b.cmpCls;
			delete b.cmpCls
		}
		if (b.componentCls) {
			a.push(b.componentCls)
		} else {
			b.componentCls = b.baseCls
		}
		if (b.cls) {
			a.push(b.cls);
			delete b.cls
		}
		return a.concat(b.additionalCls)
	},
	setUI : function(e) {
		var d = this, b = Ext.Array.clone(d.uiCls), f = [], a, c;
		for (c = 0; c < b.length; c++) {
			a = b[c];
			d.removeClsWithUI(a);
			f.push(a)
		}
		d.removeUIFromElement();
		d.ui = e;
		d.addUIToElement();
		for (c = 0; c < f.length; c++) {
			a = f[c];
			d.addClsWithUI(a)
		}
	},
	addClsWithUI : function(a) {
		var c = this, b;
		if (!Ext.isArray(a)) {
			a = [a]
		}
		for (b = 0; b < a.length; b++) {
			if (a[b] && !c.hasUICls(a[b])) {
				c.uiCls = Ext.Array.clone(c.uiCls);
				c.uiCls.push(a[b]);
				c.addUIClsToElement(a[b])
			}
		}
	},
	removeClsWithUI : function(a) {
		var c = this, b;
		if (!Ext.isArray(a)) {
			a = [a]
		}
		for (b = 0; b < a.length; b++) {
			if (a[b] && c.hasUICls(a[b])) {
				c.uiCls = Ext.Array.remove(c.uiCls, a[b]);
				c.removeUIClsFromElement(a[b])
			}
		}
	},
	hasUICls : function(a) {
		var b = this, c = b.uiCls || [];
		return Ext.Array.contains(c, a)
	},
	addUIClsToElement : function(a, f) {
		var e = this;
		e.addCls(Ext.baseCSSPrefix + a);
		e.addCls(e.baseCls + "-" + a);
		e.addCls(e.baseCls + "-" + e.ui + "-" + a);
		if (!f && e.rendered && e.frame && !Ext.supports.CSS3BorderRadius) {
			var c = ["tl", "tc", "tr", "ml", "mc", "mr", "bl", "bc", "br"], b, d;
			for (b = 0; b < c.length; b++) {
				d = e["frame" + c[b].toUpperCase()];
				if (d && d.dom) {
					d.addCls(e.baseCls + "-" + e.ui + "-" + c[b]);
					d.addCls(e.baseCls + "-" + e.ui + "-" + a + "-" + c[b])
				}
			}
		}
	},
	removeUIClsFromElement : function(a, f) {
		var e = this;
		e.removeCls(Ext.baseCSSPrefix + a);
		e.removeCls(e.baseCls + "-" + a);
		e.removeCls(e.baseCls + "-" + e.ui + "-" + a);
		if (!f && e.rendered && e.frame && !Ext.supports.CSS3BorderRadius) {
			var c = ["tl", "tc", "tr", "ml", "mc", "mr", "bl", "bc", "br"], b, d;
			for (b = 0; b < c.length; b++) {
				d = e["frame" + c[b].toUpperCase()];
				if (d && d.dom) {
					d.removeCls(e.baseCls + "-" + e.ui + "-" + a + "-" + c[b])
				}
			}
		}
	},
	addUIToElement : function(e) {
		var d = this;
		d.addCls(d.baseCls + "-" + d.ui);
		if (d.rendered && d.frame && !Ext.supports.CSS3BorderRadius) {
			var b = ["tl", "tc", "tr", "ml", "mc", "mr", "bl", "bc", "br"], a, c;
			for (a = 0; a < b.length; a++) {
				c = d["frame" + b[a].toUpperCase()];
				if (c) {
					c.addCls(d.baseCls + "-" + d.ui + "-" + b[a])
				}
			}
		}
	},
	removeUIFromElement : function() {
		var d = this;
		d.removeCls(d.baseCls + "-" + d.ui);
		if (d.rendered && d.frame && !Ext.supports.CSS3BorderRadius) {
			var b = ["tl", "tc", "tr", "ml", "mc", "mr", "bl", "bc", "br"], a, c;
			for (a = 0; a < b.length; a++) {
				c = d["frame" + b[a].toUpperCase()];
				if (c) {
					c.removeCls(d.baseCls + "-" + d.ui + "-" + b[a])
				}
			}
		}
	},
	getElConfig : function() {
		var a = this.autoEl || {
			tag : "div"
		};
		a.id = this.id;
		return a
	},
	getInsertPosition : function(a) {
		if (a !== undefined) {
			if (Ext.isNumber(a)) {
				a = this.container.dom.childNodes[a]
			} else {
				a = Ext.getDom(a)
			}
		}
		return a
	},
	initContainer : function(a) {
		var b = this;
		if (!a && b.el) {
			a = b.el.dom.parentNode;
			b.allowDomMove = false
		}
		b.container = Ext.get(a);
		if (b.ctCls) {
			b.container.addCls(b.ctCls)
		}
		return b.container
	},
	initRenderData : function() {
		var a = this;
		return Ext.applyIf(a.renderData, {
					ui : a.ui,
					uiCls : a.uiCls,
					baseCls : a.baseCls,
					componentCls : a.componentCls,
					frame : a.frame
				})
	},
	getTpl : function(b) {
		var a = this.self.prototype, c;
		if (this.hasOwnProperty(b)) {
			if (!(this[b] instanceof Ext.XTemplate)) {
				this[b] = Ext.ClassManager.dynInstantiate("Ext.XTemplate",
						this[b])
			}
			return this[b]
		}
		if (!(a[b] instanceof Ext.XTemplate)) {
			c = a;
			do {
				if (c.hasOwnProperty(b)) {
					c[b] = Ext.ClassManager.dynInstantiate("Ext.XTemplate",
							c[b]);
					break
				}
				c = c.superclass
			} while (c)
		}
		return a[b]
	},
	initRenderTpl : function() {
		return this.getTpl("renderTpl")
	},
	initStyles : function() {
		var b = {}, c = this, a = Ext.core.Element;
		if (Ext.isString(c.style)) {
			b = a.parseStyles(c.style)
		} else {
			b = Ext.apply({}, c.style)
		}
		if (c.padding !== undefined) {
			b.padding = a.unitizeBox((c.padding === true) ? 5 : c.padding)
		}
		if (c.margin !== undefined) {
			b.margin = a.unitizeBox((c.margin === true) ? 5 : c.margin)
		}
		delete c.style;
		return b
	},
	initContent : function() {
		var b = this, d = b.getTargetEl(), a, c;
		if (b.html) {
			d.update(Ext.core.DomHelper.markup(b.html));
			delete b.html
		}
		if (b.contentEl) {
			a = Ext.get(b.contentEl);
			c = Ext.baseCSSPrefix;
			a.removeCls([c + "hidden", c + "hide-display", c + "hide-offsets",
					c + "hide-nosize"]);
			d.appendChild(a.dom)
		}
		if (b.tpl) {
			if (!b.tpl.isTemplate) {
				b.tpl = Ext.create("Ext.XTemplate", b.tpl)
			}
			if (b.data) {
				b.tpl[b.tplWriteMode](d, b.data);
				delete b.data
			}
		}
	},
	initEvents : function() {
		var b = this, d = b.afterRenderEvents, c, a;
		if (d) {
			for (c in d) {
				if (d.hasOwnProperty(c)) {
					a = d[c];
					if (b[c] && b[c].on) {
						b.mon(b[c], a)
					}
				}
			}
		}
	},
	applyRenderSelectors : function() {
		var b = this.renderSelectors || {}, c = this.el.dom, a;
		for (a in b) {
			if (b.hasOwnProperty(a) && b[a]) {
				this[a] = Ext.get(Ext.DomQuery.selectNode(b[a], c))
			}
		}
	},
	is : function(a) {
		return Ext.ComponentQuery.is(this, a)
	},
	up : function(b) {
		var a = this.ownerCt;
		if (b) {
			for (; a; a = a.ownerCt) {
				if (Ext.ComponentQuery.is(a, b)) {
					return a
				}
			}
		}
		return a
	},
	nextSibling : function(b) {
		var f = this.ownerCt, d, e, a, g;
		if (f) {
			d = f.items;
			a = d.indexOf(this) + 1;
			if (a) {
				if (b) {
					for (e = d.getCount(); a < e; a++) {
						if ((g = d.getAt(a)).is(b)) {
							return g
						}
					}
				} else {
					if (a < d.getCount()) {
						return d.getAt(a)
					}
				}
			}
		}
		return null
	},
	previousSibling : function(b) {
		var e = this.ownerCt, d, a, f;
		if (e) {
			d = e.items;
			a = d.indexOf(this);
			if (a != -1) {
				if (b) {
					for (--a; a >= 0; a--) {
						if ((f = d.getAt(a)).is(b)) {
							return f
						}
					}
				} else {
					if (a) {
						return d.getAt(--a)
					}
				}
			}
		}
		return null
	},
	previousNode : function(c, d) {
		var g = this, b, f, a, e;
		if (d && g.is(c)) {
			return g
		}
		b = this.prev(c);
		if (b) {
			return b
		}
		if (g.ownerCt) {
			for (f = g.ownerCt.items.items, e = Ext.Array.indexOf(f, g) - 1; e > -1; e--) {
				if (f[e].query) {
					b = f[e].query(c);
					b = b[b.length - 1];
					if (b) {
						return b
					}
				}
			}
			return g.ownerCt.previousNode(c, true)
		}
	},
	nextNode : function(c, d) {
		var g = this, b, f, a, e;
		if (d && g.is(c)) {
			return g
		}
		b = this.next(c);
		if (b) {
			return b
		}
		if (g.ownerCt) {
			for (f = g.ownerCt.items, e = f.indexOf(g) + 1, f = f.items, a = f.length; e < a; e++) {
				if (f[e].down) {
					b = f[e].down(c);
					if (b) {
						return b
					}
				}
			}
			return g.ownerCt.nextNode(c)
		}
	},
	getId : function() {
		return this.id || (this.id = "ext-comp-" + (this.getAutoId()))
	},
	getItemId : function() {
		return this.itemId || this.id
	},
	getEl : function() {
		return this.el
	},
	getTargetEl : function() {
		return this.frameBody || this.el
	},
	isXType : function(b, a) {
		if (Ext.isFunction(b)) {
			b = b.xtype
		} else {
			if (Ext.isObject(b)) {
				b = b.statics().xtype
			}
		}
		return !a
				? ("/" + this.getXTypes() + "/").indexOf("/" + b + "/") != -1
				: this.self.xtype == b
	},
	getXTypes : function() {
		var b = this.self, c = [], a = this, d;
		if (!b.xtypes) {
			while (a && Ext.getClass(a)) {
				d = Ext.getClass(a).xtype;
				if (d !== undefined) {
					c.unshift(d)
				}
				a = a.superclass
			}
			b.xtypeChain = c;
			b.xtypes = c.join("/")
		}
		return b.xtypes
	},
	update : function(b, c, a) {
		var d = this;
		if (d.tpl && !Ext.isString(b)) {
			d.data = b;
			if (d.rendered) {
				d.tpl[d.tplWriteMode](d.getTargetEl(), b || {})
			}
		} else {
			d.html = Ext.isObject(b) ? Ext.core.DomHelper.markup(b) : b;
			if (d.rendered) {
				d.getTargetEl().update(d.html, c, a)
			}
		}
		if (d.rendered) {
			d.doComponentLayout()
		}
	},
	setVisible : function(a) {
		return this[a ? "show" : "hide"]()
	},
	isVisible : function(a) {
		var c = this, e = c, d = !c.hidden, b = c.ownerCt;
		c.hiddenAncestor = false;
		if (c.destroyed) {
			return false
		}
		if (a && d && c.rendered && b) {
			while (b) {
				if (b.hidden
						|| (b.collapsed && !(b.getDockedItems && Ext.Array
								.contains(b.getDockedItems(), e)))) {
					c.hiddenAncestor = b;
					d = false;
					break
				}
				e = b;
				b = b.ownerCt
			}
		}
		return d
	},
	enable : function(a) {
		var b = this;
		if (b.rendered) {
			b.el.removeCls(b.disabledCls);
			b.el.dom.disabled = false;
			b.onEnable()
		}
		b.disabled = false;
		if (a !== true) {
			b.fireEvent("enable", b)
		}
		return b
	},
	disable : function(a) {
		var b = this;
		if (b.rendered) {
			b.el.addCls(b.disabledCls);
			b.el.dom.disabled = true;
			b.onDisable()
		}
		b.disabled = true;
		if (a !== true) {
			b.fireEvent("disable", b)
		}
		return b
	},
	onEnable : function() {
		if (this.maskOnDisable) {
			this.el.unmask()
		}
	},
	onDisable : function() {
		if (this.maskOnDisable) {
			this.el.mask()
		}
	},
	isDisabled : function() {
		return this.disabled
	},
	setDisabled : function(a) {
		return this[a ? "disable" : "enable"]()
	},
	isHidden : function() {
		return this.hidden
	},
	addCls : function(a) {
		var b = this;
		if (!a) {
			return b
		}
		if (!Ext.isArray(a)) {
			a = a.replace(b.trimRe, "").split(b.spacesRe)
		}
		if (b.rendered) {
			b.el.addCls(a)
		} else {
			b.additionalCls = Ext.Array.unique(b.additionalCls.concat(a))
		}
		return b
	},
	addClass : function() {
		return this.addCls.apply(this, arguments)
	},
	removeCls : function(a) {
		var b = this;
		if (!a) {
			return b
		}
		if (!Ext.isArray(a)) {
			a = a.replace(b.trimRe, "").split(b.spacesRe)
		}
		if (b.rendered) {
			b.el.removeCls(a)
		} else {
			if (b.additionalCls.length) {
				Ext.each(a, function(c) {
							Ext.Array.remove(b.additionalCls, c)
						})
			}
		}
		return b
	},
	addOverCls : function() {
		var a = this;
		if (!a.disabled) {
			a.el.addCls(a.overCls)
		}
	},
	removeOverCls : function() {
		this.el.removeCls(this.overCls)
	},
	addListener : function(b, f, e, a) {
		var g = this, d, c;
		if (Ext.isString(b) && (Ext.isObject(f) || a && a.element)) {
			if (a.element) {
				d = f;
				f = {};
				f[b] = d;
				b = a.element;
				if (e) {
					f.scope = e
				}
				for (c in a) {
					if (a.hasOwnProperty(c)) {
						if (g.eventOptionsRe.test(c)) {
							f[c] = a[c]
						}
					}
				}
			}
			if (g[b] && g[b].on) {
				g.mon(g[b], f)
			} else {
				g.afterRenderEvents = g.afterRenderEvents || {};
				g.afterRenderEvents[b] = f
			}
		}
		return g.mixins.observable.addListener.apply(g, arguments)
	},
	getBubbleTarget : function() {
		return this.ownerCt
	},
	isFloating : function() {
		return this.floating
	},
	isDraggable : function() {
		return !!this.draggable
	},
	isDroppable : function() {
		return !!this.droppable
	},
	onAdded : function(a, b) {
		this.ownerCt = a;
		this.fireEvent("added", this, a, b)
	},
	onRemoved : function() {
		var a = this;
		a.fireEvent("removed", a, a.ownerCt);
		delete a.ownerCt
	},
	beforeDestroy : Ext.emptyFn,
	onResize : Ext.emptyFn,
	setSize : function(b, a) {
		var c = this, d;
		if (Ext.isObject(b)) {
			a = b.height;
			b = b.width
		}
		if (Ext.isNumber(b)) {
			b = Ext.Number.constrain(b, c.minWidth, c.maxWidth)
		}
		if (Ext.isNumber(a)) {
			a = Ext.Number.constrain(a, c.minHeight, c.maxHeight)
		}
		if (!c.rendered || !c.isVisible()) {
			if (c.hiddenAncestor) {
				d = c.hiddenAncestor.layoutOnShow;
				d.remove(c);
				d.add(c)
			}
			c.needsLayout = {
				width : b,
				height : a,
				isSetSize : true
			};
			if (!c.rendered) {
				c.width = (b !== undefined) ? b : c.width;
				c.height = (a !== undefined) ? a : c.height
			}
			return c
		}
		c.doComponentLayout(b, a, true);
		return c
	},
	setCalculatedSize : function(c, a, b) {
		var d = this, e;
		if (Ext.isObject(c)) {
			b = c.ownerCt;
			a = c.height;
			c = c.width
		}
		if (Ext.isNumber(c)) {
			c = Ext.Number.constrain(c, d.minWidth, d.maxWidth)
		}
		if (Ext.isNumber(a)) {
			a = Ext.Number.constrain(a, d.minHeight, d.maxHeight)
		}
		if (!d.rendered || !d.isVisible()) {
			if (d.hiddenAncestor) {
				e = d.hiddenAncestor.layoutOnShow;
				e.remove(d);
				e.add(d)
			}
			d.needsLayout = {
				width : c,
				height : a,
				isSetSize : false,
				ownerCt : b
			};
			return d
		}
		d.doComponentLayout(c, a, false, b);
		return d
	},
	doComponentLayout : function(e, a, b, d) {
		var f = this, c = f.getComponentLayout();
		if (f.rendered && c) {
			e = (e !== undefined) ? e : f.width;
			a = (a !== undefined) ? a : f.height;
			if (b) {
				f.width = e;
				f.height = a
			}
			c.layout(e, a, b, d)
		}
		return f
	},
	setComponentLayout : function(b) {
		var a = this.componentLayout;
		if (a && a.isLayout && a != b) {
			a.setOwner(null)
		}
		this.componentLayout = b;
		b.setOwner(this)
	},
	getComponentLayout : function() {
		var a = this;
		if (!a.componentLayout || !a.componentLayout.isLayout) {
			a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,
					"autocomponent"))
		}
		return a.componentLayout
	},
	afterComponentLayout : function(c, a, b, d) {
		this.fireEvent("resize", this, c, a)
	},
	beforeComponentLayout : function(c, a, b, d) {
		return true
	},
	setPosition : function(a, c) {
		var b = this;
		if (Ext.isObject(a)) {
			c = a.y;
			a = a.x
		}
		if (!b.rendered) {
			return b
		}
		if (a !== undefined || c !== undefined) {
			b.el.setBox(a, c);
			b.onPosition(a, c);
			b.fireEvent("move", b, a, c)
		}
		return b
	},
	onPosition : Ext.emptyFn,
	setWidth : function(a) {
		return this.setSize(a)
	},
	setHeight : function(a) {
		return this.setSize(undefined, a)
	},
	getSize : function() {
		return this.el.getSize()
	},
	getWidth : function() {
		return this.el.getWidth()
	},
	getHeight : function() {
		return this.el.getHeight()
	},
	getLoader : function() {
		var c = this, b = c.autoLoad ? (Ext.isObject(c.autoLoad)
				? c.autoLoad
				: {
					url : c.autoLoad
				}) : null, a = c.loader || b;
		if (a) {
			if (!a.isLoader) {
				c.loader = Ext.create("Ext.ComponentLoader", Ext.apply({
									target : c,
									autoLoad : b
								}, a))
			} else {
				a.setTarget(c)
			}
			return c.loader
		}
		return null
	},
	setLoading : function(c, d) {
		var b = this, a;
		if (b.rendered) {
			if (c !== false && !b.collapsed) {
				if (Ext.isObject(c)) {
					a = c
				} else {
					if (Ext.isString(c)) {
						a = {
							msg : c
						}
					} else {
						a = {}
					}
				}
				b.loadMask = b.loadMask
						|| Ext.create("Ext.LoadMask", d
										? b.getTargetEl()
										: b.el, a);
				b.loadMask.show()
			} else {
				if (b.loadMask) {
					Ext.destroy(b.loadMask);
					b.loadMask = null
				}
			}
		}
		return b.loadMask
	},
	setDocked : function(b, c) {
		var a = this;
		a.dock = b;
		if (c && a.ownerCt && a.rendered) {
			a.ownerCt.doComponentLayout()
		}
		return a
	},
	onDestroy : function() {
		var a = this;
		if (a.monitorResize && Ext.EventManager.resizeEvent) {
			Ext.EventManager.resizeEvent.removeListener(a.setSize, a)
		}
		Ext.destroy(a.componentLayout, a.loadMask)
	},
	destroy : function() {
		var a = this;
		if (!a.isDestroyed) {
			if (a.fireEvent("beforedestroy", a) !== false) {
				a.destroying = true;
				a.beforeDestroy();
				if (a.floating) {
					delete a.floatParent;
					if (a.zIndexManager) {
						a.zIndexManager.unregister(a)
					}
				} else {
					if (a.ownerCt && a.ownerCt.remove) {
						a.ownerCt.remove(a, false)
					}
				}
				if (a.rendered) {
					a.el.remove()
				}
				a.onDestroy();
				Ext.destroy(a.plugins);
				Ext.ComponentManager.unregister(a);
				a.fireEvent("destroy", a);
				a.mixins.state.destroy.call(a);
				a.clearListeners();
				a.destroying = false;
				a.isDestroyed = true
			}
		}
	},
	getPlugin : function(b) {
		var c = 0, a = this.plugins, d = a.length;
		for (; c < d; c++) {
			if (a[c].pluginId === b) {
				return a[c]
			}
		}
	},
	isDescendantOf : function(a) {
		return !!this.findParentBy(function(b) {
					return b === a
				})
	}
}, function() {
	this.createAlias({
				on : "addListener",
				prev : "previousSibling",
				next : "nextSibling"
			})
});
Ext.define("Ext.Component", {
	alias : ["widget.component", "widget.box"],
	extend : "Ext.AbstractComponent",
	requires : ["Ext.util.DelayedTask"],
	uses : ["Ext.Layer", "Ext.resizer.Resizer", "Ext.util.ComponentDragger"],
	mixins : {
		floating : "Ext.util.Floating"
	},
	statics : {
		DIRECTION_TOP : "top",
		DIRECTION_RIGHT : "right",
		DIRECTION_BOTTOM : "bottom",
		DIRECTION_LEFT : "left"
	},
	resizeHandles : "all",
	floating : false,
	toFrontOnShow : true,
	hideMode : "display",
	hideParent : false,
	ariaRole : "presentation",
	bubbleEvents : [],
	actionMode : "el",
	monPropRe : /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
	constructor : function(a) {
		a = a || {};
		if (a.initialConfig) {
			if (a.isAction) {
				this.baseAction = a
			}
			a = a.initialConfig
		} else {
			if (a.tagName || a.dom || Ext.isString(a)) {
				a = {
					applyTo : a,
					id : a.id || a
				}
			}
		}
		this.callParent([a]);
		if (this.baseAction) {
			this.baseAction.addComponent(this)
		}
	},
	initComponent : function() {
		var a = this;
		if (a.listeners) {
			a.on(a.listeners);
			delete a.listeners
		}
		a.enableBubble(a.bubbleEvents);
		a.mons = []
	},
	afterRender : function() {
		var b = this, a = b.resizable;
		if (b.floating) {
			b.makeFloating(b.floating)
		} else {
			b.el.setVisibilityMode(Ext.core.Element[b.hideMode.toUpperCase()])
		}
		b.setAutoScroll(b.autoScroll);
		b.callParent();
		if (!(b.x && b.y) && (b.pageX || b.pageY)) {
			b.setPagePosition(b.pageX, b.pageY)
		}
		if (a) {
			b.initResizable(a)
		}
		if (b.draggable) {
			b.initDraggable()
		}
		b.initAria()
	},
	initAria : function() {
		var a = this.getActionEl(), b = this.ariaRole;
		if (b) {
			a.dom.setAttribute("role", b)
		}
	},
	setAutoScroll : function(a) {
		var b = this, c;
		a = !!a;
		if (b.rendered) {
			c = b.getTargetEl();
			c.setStyle("overflow", a ? "auto" : "");
			if (a && (Ext.isIE6 || Ext.isIE7)) {
				c.position()
			}
		}
		b.autoScroll = a;
		return b
	},
	makeFloating : function(a) {
		this.mixins.floating.constructor.call(this, a)
	},
	initResizable : function(a) {
		a = Ext.apply({
					target : this,
					dynamic : false,
					constrainTo : this.constrainTo,
					handles : this.resizeHandles
				}, a);
		a.target = this;
		this.resizer = Ext.create("Ext.resizer.Resizer", a)
	},
	getDragEl : function() {
		return this.el
	},
	initDraggable : function() {
		var b = this, a = Ext.applyIf({
					el : this.getDragEl(),
					constrainTo : b.constrainTo
							|| (b.floatParent
									? b.floatParent.getTargetEl()
									: b.el.dom.parentNode)
				}, this.draggable);
		if (b.constrain || b.constrainDelegate) {
			a.constrain = b.constrain;
			a.constrainDelegate = b.constrainDelegate
		}
		this.dd = Ext.create("Ext.util.ComponentDragger", this, a)
	},
	setPosition : function(j, h, a) {
		var f = this, b = f.el, k = {}, g, i, e, d, c;
		if (Ext.isArray(j)) {
			a = h;
			h = j[1];
			j = j[0]
		}
		f.x = j;
		f.y = h;
		if (!f.rendered) {
			return f
		}
		g = f.adjustPosition(j, h);
		i = g.x;
		e = g.y;
		d = Ext.isNumber(i);
		c = Ext.isNumber(e);
		if (d || c) {
			if (a) {
				if (d) {
					k.left = i
				}
				if (c) {
					k.top = e
				}
				f.stopAnimation();
				f.animate(Ext.apply({
							duration : 1000,
							listeners : {
								afteranimate : Ext.Function.bind(
										f.afterSetPosition, f, [i, e])
							},
							to : k
						}, a))
			} else {
				if (!d) {
					b.setTop(e)
				} else {
					if (!c) {
						b.setLeft(i)
					} else {
						b.setLeftTop(i, e)
					}
				}
				f.afterSetPosition(i, e)
			}
		}
		return f
	},
	afterSetPosition : function(b, a) {
		this.onPosition(b, a);
		this.fireEvent("move", this, b, a)
	},
	showAt : function(a, c, b) {
		if (this.floating) {
			this.setPosition(a, c, b)
		} else {
			this.setPagePosition(a, c, b)
		}
		this.show()
	},
	setPagePosition : function(a, e, b) {
		var c = this, d;
		if (Ext.isArray(a)) {
			e = a[1];
			a = a[0]
		}
		c.pageX = a;
		c.pageY = e;
		if (c.floating && c.floatParent) {
			d = c.floatParent.getTargetEl().getViewRegion();
			if (Ext.isNumber(a) && Ext.isNumber(d.left)) {
				a -= d.left
			}
			if (Ext.isNumber(e) && Ext.isNumber(d.top)) {
				e -= d.top
			}
			c.setPosition(a, e, b)
		} else {
			d = c.el.translatePoints(a, e);
			c.setPosition(d.left, d.top, b)
		}
		return c
	},
	getBox : function(a) {
		var c = this.getPosition(a);
		var b = this.getSize();
		b.x = c[0];
		b.y = c[1];
		return b
	},
	updateBox : function(a) {
		this.setSize(a.width, a.height);
		this.setPagePosition(a.x, a.y);
		return this
	},
	getOuterSize : function() {
		var a = this.el;
		return {
			width : a.getWidth() + a.getMargin("lr"),
			height : a.getHeight() + a.getMargin("tb")
		}
	},
	adjustSize : function(a, b) {
		if (this.autoWidth) {
			a = "auto"
		}
		if (this.autoHeight) {
			b = "auto"
		}
		return {
			width : a,
			height : b
		}
	},
	adjustPosition : function(a, c) {
		if (this.floating && this.floatParent) {
			var b = this.floatParent.getTargetEl().getViewRegion();
			a += b.left;
			c += b.top
		}
		return {
			x : a,
			y : c
		}
	},
	getPosition : function(a) {
		var b = this.el, c;
		if (a === true) {
			return [b.getLeft(true), b.getTop(true)]
		}
		c = this.xy || b.getXY();
		if (this.floating && this.floatParent) {
			var d = this.floatParent.getTargetEl().getViewRegion();
			c[0] -= d.left;
			c[1] -= d.top
		}
		return c
	},
	getId : function() {
		return this.id
				|| (this.id = (this.getXType() || "ext-comp") + "-"
						+ this.getAutoId())
	},
	onEnable : function() {
		var a = this.getActionEl();
		a.dom.removeAttribute("aria-disabled");
		a.dom.disabled = false;
		this.callParent()
	},
	onDisable : function() {
		var a = this.getActionEl();
		a.dom.setAttribute("aria-disabled", true);
		a.dom.disabled = true;
		this.callParent()
	},
	show : function(c, a, b) {
		if (this.rendered && this.isVisible()) {
			if (this.toFrontOnShow && this.floating) {
				this.toFront()
			}
		} else {
			if (this.fireEvent("beforeshow", this) !== false) {
				this.hidden = false;
				if (!this.rendered && (this.autoRender || this.floating)) {
					this.doAutoRender()
				}
				if (this.rendered) {
					this.beforeShow();
					this.onShow.apply(this, arguments);
					if (this.ownerCt
							&& !this.floating
							&& !(this.ownerCt.suspendLayout || this.ownerCt.layout.layoutBusy)) {
						this.ownerCt.doLayout()
					}
					this.afterShow.apply(this, arguments)
				}
			}
		}
		return this
	},
	beforeShow : Ext.emptyFn,
	onShow : function() {
		var a = this;
		a.el.show();
		if (this.floating && this.constrain) {
			this.doConstrain()
		}
		a.callParent(arguments)
	},
	afterShow : function(g, b, e) {
		var f = this, a, c, d;
		g = g || f.animateTarget;
		if (!f.ghost) {
			g = null
		}
		if (g) {
			g = g.el ? g.el : Ext.get(g);
			c = f.el.getBox();
			a = g.getBox();
			a.width += "px";
			a.height += "px";
			c.width += "px";
			c.height += "px";
			f.el.addCls(Ext.baseCSSPrefix + "hide-offsets");
			d = f.ghost();
			d.el.stopAnimation();
			d.el.animate({
						from : a,
						to : c,
						listeners : {
							afteranimate : function() {
								delete d.componentLayout.lastComponentSize;
								f.unghost();
								f.el.removeCls(Ext.baseCSSPrefix
										+ "hide-offsets");
								if (f.floating) {
									f.toFront()
								}
								Ext.callback(b, e || f)
							}
						}
					})
		} else {
			if (f.floating) {
				f.toFront()
			}
			Ext.callback(b, e || f)
		}
		f.fireEvent("show", f)
	},
	hide : function() {
		this.showOnParentShow = false;
		if (!(this.rendered && !this.isVisible())
				&& this.fireEvent("beforehide", this) !== false) {
			this.hidden = true;
			if (this.rendered) {
				this.onHide.apply(this, arguments);
				if (this.ownerCt
						&& !this.floating
						&& !(this.ownerCt.suspendLayout || this.ownerCt.layout.layoutBusy)) {
					this.ownerCt.doLayout()
				}
			}
		}
		return this
	},
	onHide : function(f, a, d) {
		var e = this, c, b;
		f = f || e.animateTarget;
		if (!e.ghost) {
			f = null
		}
		if (f) {
			f = f.el ? f.el : Ext.get(f);
			c = e.ghost();
			c.el.stopAnimation();
			b = f.getBox();
			b.width += "px";
			b.height += "px";
			c.el.animate({
						to : b,
						listeners : {
							afteranimate : function() {
								delete c.componentLayout.lastComponentSize;
								c.el.hide();
								e.afterHide(a, d)
							}
						}
					})
		}
		e.el.hide();
		if (!f) {
			e.afterHide(a, d)
		}
	},
	afterHide : function(a, b) {
		Ext.callback(a, b || this);
		this.fireEvent("hide", this)
	},
	onDestroy : function() {
		var a = this;
		if (a.rendered) {
			Ext.destroy(a.proxy, a.resizer);
			if (a.actionMode == "container" || a.removeMode == "container") {
				a.container.remove()
			}
		}
		a.callParent()
	},
	deleteMembers : function() {
		var b = arguments, a = b.length, c = 0;
		for (; c < a; ++c) {
			delete this[b[c]]
		}
	},
	focus : function(d, b) {
		var c = this, a;
		if (b) {
			c.focusTask.delay(Ext.isNumber(b) ? b : 10, null, c, [d, false]);
			return c
		}
		if (c.rendered && !c.isDestroyed) {
			a = c.getFocusEl();
			a.focus();
			if (a.dom && d === true) {
				a.dom.select()
			}
			if (c.floating) {
				c.toFront(true)
			}
		}
		return c
	},
	getFocusEl : function() {
		return this.el
	},
	blur : function() {
		if (this.rendered) {
			this.getFocusEl().blur()
		}
		return this
	},
	getEl : function() {
		return this.el
	},
	getResizeEl : function() {
		return this.el
	},
	getPositionEl : function() {
		return this.el
	},
	getActionEl : function() {
		return this.el
	},
	getVisibilityEl : function() {
		return this.el
	},
	onResize : Ext.emptyFn,
	getBubbleTarget : function() {
		return this.ownerCt
	},
	getContentTarget : function() {
		return this.el
	},
	cloneConfig : function(c) {
		c = c || {};
		var d = c.id || Ext.id();
		var a = Ext.applyIf(c, this.initialConfig);
		a.id = d;
		var b = Ext.getClass(this);
		return new b(a)
	},
	getXType : function() {
		return this.self.xtype
	},
	findParentBy : function(a) {
		var b;
		for (b = this.ownerCt; b && !a(b, this); b = b.ownerCt) {
		}
		return b || null
	},
	findParentByType : function(a) {
		return Ext.isFunction(a) ? this.findParentBy(function(b) {
					return b.constructor === a
				}) : this.up(a)
	},
	bubble : function(c, b, a) {
		var d = this;
		while (d) {
			if (c.apply(b || d, a || [d]) === false) {
				break
			}
			d = d.ownerCt
		}
		return this
	},
	getProxy : function() {
		if (!this.proxy) {
			this.proxy = this.el.createProxy(Ext.baseCSSPrefix + "proxy-el",
					Ext.getBody(), true)
		}
		return this.proxy
	}
}, function() {
	this.prototype.focusTask = Ext.create("Ext.util.DelayedTask",
			this.prototype.focus)
});
Ext.define("Ext.button.Button", {
	alias : "widget.button",
	extend : "Ext.Component",
	requires : ["Ext.menu.Manager", "Ext.util.ClickRepeater",
			"Ext.layout.component.Button", "Ext.util.TextMetrics",
			"Ext.util.KeyMap"],
	alternateClassName : "Ext.Button",
	isButton : true,
	componentLayout : "button",
	hidden : false,
	disabled : false,
	pressed : false,
	enableToggle : false,
	menuAlign : "tl-bl?",
	type : "button",
	clickEvent : "click",
	preventDefault : true,
	handleMouseEvents : true,
	tooltipType : "qtip",
	baseCls : Ext.baseCSSPrefix + "btn",
	pressedCls : "pressed",
	overCls : "over",
	focusCls : "focus",
	menuActiveCls : "menu-active",
	ariaRole : "button",
	renderTpl : '<em class="{splitCls}"><tpl if="href"><a href="{href}" target="{target}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link"><span class="{baseCls}-inner">{text}</span></a></tpl><tpl if="!href"><button type="{type}" hidefocus="true"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off"><span class="{baseCls}-inner" style="{innerSpanStyle}">{text}</span></button></tpl></em>',
	scale : "small",
	allowedScales : ["small", "medium", "large"],
	iconAlign : "left",
	arrowAlign : "right",
	arrowCls : "arrow",
	maskOnDisable : false,
	initComponent : function() {
		var a = this;
		a.callParent(arguments);
		a.addEvents("click", "toggle", "mouseover", "mouseout", "menushow",
				"menuhide", "menutriggerover", "menutriggerout");
		if (a.menu) {
			a.split = true;
			a.menu = Ext.menu.Manager.get(a.menu);
			a.menu.ownerCt = a
		}
		if (a.url) {
			a.href = a.url
		}
		if (a.href && !a.hasOwnProperty("preventDefault")) {
			a.preventDefault = false
		}
		if (Ext.isString(a.toggleGroup)) {
			a.enableToggle = true
		}
	},
	initAria : function() {
		this.callParent();
		var a = this.getActionEl();
		if (this.menu) {
			a.dom.setAttribute("aria-haspopup", true)
		}
	},
	getActionEl : function() {
		return this.btnEl
	},
	getFocusEl : function() {
		return this.btnEl
	},
	setButtonCls : function() {
		var c = this, b = c.el, a = [];
		if (c.useSetClass) {
			if (!Ext.isEmpty(c.oldCls)) {
				c.removeClsWithUI(c.oldCls);
				c.removeClsWithUI(c.pressedCls)
			}
			if (c.iconCls || c.icon) {
				if (c.text) {
					a.push("icon-text-" + c.iconAlign)
				} else {
					a.push("icon")
				}
			} else {
				if (c.text) {
					a.push("noicon")
				}
			}
			c.oldCls = a;
			c.addClsWithUI(a);
			c.addClsWithUI(c.pressed ? c.pressedCls : null)
		}
	},
	onRender : function(d, a) {
		var e = this, c, b;
		Ext.applyIf(e.renderData, e.getTemplateArgs());
		Ext.applyIf(e.renderSelectors, {
					btnEl : e.href ? "a" : "button",
					btnWrap : "em",
					btnInnerEl : "." + e.baseCls + "-inner"
				});
		if (e.scale) {
			e.ui = e.ui + "-" + e.scale
		}
		e.callParent(arguments);
		if (e.split && e.arrowTooltip) {
			e.arrowEl.dom[e.tooltipType] = e.arrowTooltip
		}
		e.mon(e.btnEl, {
					scope : e,
					focus : e.onFocus,
					blur : e.onBlur
				});
		b = e.el;
		if (e.icon) {
			e.setIcon(e.icon)
		}
		if (e.iconCls) {
			e.setIconCls(e.iconCls)
		}
		if (e.tooltip) {
			e.setTooltip(e.tooltip, true)
		}
		if (e.handleMouseEvents) {
			e.mon(b, {
						scope : e,
						mouseover : e.onMouseOver,
						mouseout : e.onMouseOut,
						mousedown : e.onMouseDown
					});
			if (e.split) {
				e.mon(b, {
							mousemove : e.onMouseMove,
							scope : e
						})
			}
		}
		if (e.menu) {
			e.mon(e.menu, {
						scope : e,
						show : e.onMenuShow,
						hide : e.onMenuHide
					});
			e.keyMap = Ext.create("Ext.util.KeyMap", e.el, {
						key : Ext.EventObject.DOWN,
						handler : e.onDownKey,
						scope : e
					})
		}
		if (e.repeat) {
			c = Ext.create("Ext.util.ClickRepeater", b, Ext.isObject(e.repeat)
							? e.repeat
							: {});
			e.mon(c, "click", e.onRepeatClick, e)
		} else {
			e.mon(b, e.clickEvent, e.onClick, e)
		}
		Ext.ButtonToggleManager.register(e)
	},
	getTemplateArgs : function() {
		var c = this, b = c.getPersistentBtnPadding(), a = "";
		if (Math.max.apply(Math, b) > 0) {
			a = "margin:" + Ext.Array.map(b, function(d) {
						return -d + "px"
					}).join(" ")
		}
		return {
			href : c.getHref(),
			target : c.target || "_blank",
			type : c.type,
			splitCls : c.getSplitCls(),
			cls : c.cls,
			text : c.text || "&#160;",
			tabIndex : c.tabIndex,
			innerSpanStyle : a
		}
	},
	getHref : function() {
		var a = this;
		return a.href ? Ext.urlAppend(a.href, a.params
						+ Ext.Object.toQueryString(Ext.apply(Ext.apply({},
								a.baseParams)))) : false
	},
	setParams : function(a) {
		this.params = a;
		this.btnEl.dom.href = this.getHref()
	},
	getSplitCls : function() {
		var a = this;
		return a.split ? (a.baseCls + "-" + a.arrowCls) + " "
				+ (a.baseCls + "-" + a.arrowCls + "-" + a.arrowAlign) : ""
	},
	afterRender : function() {
		var a = this;
		a.useSetClass = true;
		a.setButtonCls();
		a.doc = Ext.getDoc();
		this.callParent(arguments)
	},
	setIconCls : function(a) {
		var b = this, c = b.btnInnerEl;
		if (c) {
			c.removeCls(b.iconCls);
			c.addCls(a || "");
			b.setButtonCls()
		}
		b.iconCls = a;
		return b
	},
	setTooltip : function(c, a) {
		var b = this;
		if (b.rendered) {
			if (!a) {
				b.clearTip()
			}
			if (Ext.isObject(c)) {
				Ext.tip.QuickTipManager.register(Ext.apply({
							target : b.btnEl.id
						}, c));
				b.tooltip = c
			} else {
				b.btnEl.dom.setAttribute("data-" + this.tooltipType, c)
			}
		} else {
			b.tooltip = c
		}
		return b
	},
	getRefItems : function(a) {
		var c = this.menu, b;
		if (c) {
			b = c.getRefItems(a);
			b.unshift(c)
		}
		return b || []
	},
	clearTip : function() {
		if (Ext.isObject(this.tooltip)) {
			Ext.tip.QuickTipManager.unregister(this.btnEl)
		}
	},
	beforeDestroy : function() {
		var a = this;
		if (a.rendered) {
			a.clearTip()
		}
		if (a.menu && a.destroyMenu !== false) {
			Ext.destroy(a.btnEl, a.btnInnerEl, a.menu)
		}
		Ext.destroy(a.repeater)
	},
	onDestroy : function() {
		var a = this;
		if (a.rendered) {
			a.doc.un("mouseover", a.monitorMouseOver, a);
			a.doc.un("mouseup", a.onMouseUp, a);
			delete a.doc;
			delete a.btnEl;
			delete a.btnInnerEl;
			Ext.ButtonToggleManager.unregister(a);
			Ext.destroy(a.keyMap);
			delete a.keyMap
		}
		a.callParent()
	},
	setHandler : function(b, a) {
		this.handler = b;
		this.scope = a;
		return this
	},
	setText : function(b) {
		var a = this;
		a.text = b;
		if (a.el) {
			a.btnInnerEl.update(b || "&#160;");
			a.setButtonCls()
		}
		a.doComponentLayout();
		return a
	},
	setIcon : function(a) {
		var b = this, c = b.btnInnerEl;
		b.icon = a;
		if (c) {
			c.setStyle("background-image", a ? "url(" + a + ")" : "");
			b.setButtonCls()
		}
		return b
	},
	getText : function() {
		return this.text
	},
	toggle : function(c, a) {
		var b = this;
		c = c === undefined ? !b.pressed : !!c;
		if (c !== b.pressed) {
			if (b.rendered) {
				b[c ? "addClsWithUI" : "removeClsWithUI"](b.pressedCls)
			}
			b.btnEl.dom.setAttribute("aria-pressed", c);
			b.pressed = c;
			if (!a) {
				b.fireEvent("toggle", b, c);
				Ext.callback(b.toggleHandler, b.scope || b, [b, c])
			}
		}
		return b
	},
	showMenu : function() {
		var a = this;
		if (a.rendered && a.menu) {
			if (a.tooltip) {
				Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)
			}
			if (a.menu.isVisible()) {
				a.menu.hide()
			}
			a.menu.showBy(a.el, a.menuAlign)
		}
		return a
	},
	hideMenu : function() {
		if (this.hasVisibleMenu()) {
			this.menu.hide()
		}
		return this
	},
	hasVisibleMenu : function() {
		var a = this.menu;
		return a && a.rendered && a.isVisible()
	},
	onRepeatClick : function(a, b) {
		this.onClick(b)
	},
	onClick : function(b) {
		var a = this;
		if (a.preventDefault || (a.disabled && a.getHref()) && b) {
			b.preventDefault()
		}
		if (b.button !== 0) {
			return
		}
		if (!a.disabled) {
			if (a.enableToggle && (a.allowDepress !== false || !a.pressed)) {
				a.toggle()
			}
			if (a.menu && !a.hasVisibleMenu() && !a.ignoreNextClick) {
				a.showMenu()
			}
			a.fireEvent("click", a, b);
			if (a.handler) {
				a.handler.call(a.scope || a, a, b)
			}
			a.onBlur()
		}
	},
	onMouseOver : function(b) {
		var a = this;
		if (!a.disabled && !b.within(a.el, true, true)) {
			a.onMouseEnter(b)
		}
	},
	onMouseOut : function(b) {
		var a = this;
		if (!b.within(a.el, true, true)) {
			if (a.overMenuTrigger) {
				a.onMenuTriggerOut(b)
			}
			a.onMouseLeave(b)
		}
	},
	onMouseMove : function(g) {
		var d = this, c = d.el, f = d.overMenuTrigger, b, a;
		if (d.split) {
			if (d.arrowAlign === "right") {
				b = g.getX() - c.getX();
				a = c.getWidth()
			} else {
				b = g.getY() - c.getY();
				a = c.getHeight()
			}
			if (b > (a - d.getTriggerSize())) {
				if (!f) {
					d.onMenuTriggerOver(g)
				}
			} else {
				if (f) {
					d.onMenuTriggerOut(g)
				}
			}
		}
	},
	getTriggerSize : function() {
		var e = this, c = e.triggerSize, b, a, d;
		if (c === d) {
			b = e.arrowAlign;
			a = b.charAt(0);
			c = e.triggerSize = e.el.getFrameWidth(a)
					+ e.btnWrap.getFrameWidth(a)
					+ (e.frameSize && e.frameSize[b] || 0)
		}
		return c
	},
	onMouseEnter : function(b) {
		var a = this;
		a.addClsWithUI(a.overCls);
		a.fireEvent("mouseover", a, b)
	},
	onMouseLeave : function(b) {
		var a = this;
		a.removeClsWithUI(a.overCls);
		a.fireEvent("mouseout", a, b)
	},
	onMenuTriggerOver : function(b) {
		var a = this;
		a.overMenuTrigger = true;
		a.fireEvent("menutriggerover", a, a.menu, b)
	},
	onMenuTriggerOut : function(b) {
		var a = this;
		delete a.overMenuTrigger;
		a.fireEvent("menutriggerout", a, a.menu, b)
	},
	enable : function(a) {
		var b = this;
		b.callParent(arguments);
		b.removeClsWithUI("disabled");
		return b
	},
	disable : function(a) {
		var b = this;
		b.callParent(arguments);
		b.addClsWithUI("disabled");
		return b
	},
	setScale : function(c) {
		var a = this, b = a.ui.replace("-" + a.scale, "");
		if (!Ext.Array.contains(a.allowedScales, c)) {
			throw ("#setScale: scale must be an allowed scale ("
					+ a.allowedScales.join(", ") + ")")
		}
		a.scale = c;
		a.setUI(b)
	},
	setUI : function(b) {
		var a = this;
		if (a.scale && !b.match(a.scale)) {
			b = b + "-" + a.scale
		}
		a.callParent([b])
	},
	onFocus : function(b) {
		var a = this;
		if (!a.disabled) {
			a.addClsWithUI(a.focusCls)
		}
	},
	onBlur : function(b) {
		var a = this;
		a.removeClsWithUI(a.focusCls)
	},
	onMouseDown : function(b) {
		var a = this;
		if (!a.disabled && b.button === 0) {
			a.addClsWithUI(a.pressedCls);
			a.doc.on("mouseup", a.onMouseUp, a)
		}
	},
	onMouseUp : function(b) {
		var a = this;
		if (b.button === 0) {
			if (!a.pressed) {
				a.removeClsWithUI(a.pressedCls)
			}
			a.doc.un("mouseup", a.onMouseUp, a)
		}
	},
	onMenuShow : function(b) {
		var a = this;
		a.ignoreNextClick = 0;
		a.addClsWithUI(a.menuActiveCls);
		a.fireEvent("menushow", a, a.menu)
	},
	onMenuHide : function(b) {
		var a = this;
		a.removeClsWithUI(a.menuActiveCls);
		a.ignoreNextClick = Ext.defer(a.restoreClick, 250, a);
		a.fireEvent("menuhide", a, a.menu)
	},
	restoreClick : function() {
		this.ignoreNextClick = 0
	},
	onDownKey : function() {
		var a = this;
		if (!a.disabled) {
			if (a.menu) {
				a.showMenu()
			}
		}
	},
	getPersistentBtnPadding : function() {
		var a = Ext.button.Button, e = a.persistentPadding, c, b, d, f;
		if (!e) {
			e = a.persistentPadding = [0, 0, 0, 0];
			if (!Ext.isIE) {
				c = Ext.create("Ext.button.Button", {
							renderTo : Ext.getBody(),
							text : "test",
							style : "position:absolute;top:-999px;"
						});
				d = c.btnEl;
				f = c.btnInnerEl;
				d.setSize(null, null);
				b = f.getOffsetsTo(d);
				e[0] = b[1];
				e[1] = d.getWidth() - f.getWidth() - b[0];
				e[2] = d.getHeight() - f.getHeight() - b[1];
				e[3] = b[0];
				c.destroy()
			}
		}
		return e
	}
}, function() {
	var a = {}, e, d, b;
	function c(f, g) {
		if (g) {
			e = a[f.toggleGroup];
			for (d = 0, b = e.length; d < b; d++) {
				if (e[d] !== f) {
					e[d].toggle(false)
				}
			}
		}
	}
	Ext.ButtonToggleManager = {
		register : function(f) {
			if (!f.toggleGroup) {
				return
			}
			var g = a[f.toggleGroup];
			if (!g) {
				g = a[f.toggleGroup] = []
			}
			g.push(f);
			f.on("toggle", c)
		},
		unregister : function(f) {
			if (!f.toggleGroup) {
				return
			}
			var g = a[f.toggleGroup];
			if (g) {
				Ext.Array.remove(g, f);
				f.un("toggle", c)
			}
		},
		getPressed : function(k) {
			var j = a[k], h = 0, f;
			if (j) {
				for (f = j.length; h < f; h++) {
					if (j[h].pressed === true) {
						return j[h]
					}
				}
			}
			return null
		}
	}
});
Ext.define("Ext.ProgressBar", {
			extend : "Ext.Component",
			alias : "widget.progressbar",
			requires : ["Ext.Template", "Ext.CompositeElement",
					"Ext.TaskManager", "Ext.layout.component.ProgressBar"],
			uses : ["Ext.fx.Anim"],
			baseCls : Ext.baseCSSPrefix + "progress",
			config : {
				animate : false,
				text : ""
			},
			waitTimer : null,
			renderTpl : ['<div class="{baseCls}-text {baseCls}-text-back">',
					"<div>&#160;</div>", "</div>",
					'<div class="{baseCls}-bar">',
					'<div class="{baseCls}-text">', "<div>&#160;</div>",
					"</div>", "</div>"],
			componentLayout : "progressbar",
			initComponent : function() {
				this.callParent();
				this.renderSelectors = Ext.apply(this.renderSelectors || {}, {
							textTopEl : "." + this.baseCls + "-text",
							textBackEl : "." + this.baseCls + "-text-back",
							bar : "." + this.baseCls + "-bar"
						});
				this.addEvents("update")
			},
			afterRender : function() {
				var a = this;
				a.textEl = a.textEl ? Ext.get(a.textEl) : a.el.select("."
						+ a.baseCls + "-text");
				this.callParent(arguments);
				if (a.value) {
					a.updateProgress(a.value, a.text)
				} else {
					a.updateText(a.text)
				}
			},
			updateProgress : function(c, d, a) {
				var b;
				this.value = c || 0;
				if (d) {
					this.updateText(d)
				}
				if (this.rendered && !this.isDestroyed) {
					b = Math.floor(this.value * this.el.getWidth(true));
					if (Ext.isForcedBorderBox) {
						b += this.bar.getBorderWidth("lr")
					}
					if (a === true || (a !== false && this.animate)) {
						this.bar.stopAnimation();
						this.bar.animate(Ext.apply({
									to : {
										width : b + "px"
									}
								}, this.animate))
					} else {
						this.bar.setWidth(b)
					}
				}
				this.fireEvent("update", this, this.value, d);
				return this
			},
			updateText : function(a) {
				this.text = a;
				if (this.rendered) {
					this.textEl.update(this.text)
				}
				return this
			},
			applyText : function(a) {
				this.updateText(a)
			},
			wait : function(b) {
				if (!this.waitTimer) {
					var a = this;
					b = b || {};
					this.updateText(b.text);
					this.waitTimer = Ext.TaskManager.start({
								run : function(c) {
									var d = b.increment || 10;
									c -= 1;
									this.updateProgress(
											((((c + d) % d) + 1) * (100 / d))
													* 0.01, null, b.animate)
								},
								interval : b.interval || 1000,
								duration : b.duration,
								onStop : function() {
									if (b.fn) {
										b.fn.apply(b.scope || this)
									}
									this.reset()
								},
								scope : a
							})
				}
				return this
			},
			isWaiting : function() {
				return this.waitTimer !== null
			},
			reset : function(a) {
				this.updateProgress(0);
				this.clearTimer();
				if (a === true) {
					this.hide()
				}
				return this
			},
			clearTimer : function() {
				if (this.waitTimer) {
					this.waitTimer.onStop = null;
					Ext.TaskManager.stop(this.waitTimer);
					this.waitTimer = null
				}
			},
			onDestroy : function() {
				this.clearTimer();
				if (this.rendered) {
					if (this.textEl.isComposite) {
						this.textEl.clear()
					}
					Ext.destroyMembers(this, "textEl", "progressBar",
							"textTopEl")
				}
				this.callParent()
			}
		});
Ext.define("Ext.chart.MaskLayer", {
	extend : "Ext.Component",
	constructor : function(a) {
		a = Ext.apply(a || {}, {
			style : "position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"
		});
		this.callParent([a])
	},
	initComponent : function() {
		var a = this;
		a.callParent(arguments);
		a.addEvents("mousedown", "mouseup", "mousemove", "mouseenter",
				"mouseleave")
	},
	initDraggable : function() {
		this.callParent(arguments);
		this.dd.onStart = function(c) {
			var b = this, a = b.comp;
			this.startPosition = a.getPosition(true);
			if (a.ghost && !a.liveDrag) {
				b.proxy = a.ghost();
				b.dragTarget = b.proxy.header.el
			}
			if (b.constrain || b.constrainDelegate) {
				b.constrainTo = b.calculateConstrainRegion()
			}
		}
	}
});
Ext.define("Ext.toolbar.Spacer", {
			extend : "Ext.Component",
			alias : "widget.tbspacer",
			alternateClassName : "Ext.Toolbar.Spacer",
			baseCls : Ext.baseCSSPrefix + "toolbar-spacer",
			focusable : false
		});
Ext.define("Ext.toolbar.Fill", {
			extend : "Ext.Component",
			alias : "widget.tbfill",
			alternateClassName : "Ext.Toolbar.Fill",
			isFill : true,
			flex : 1
		});
Ext.define("Ext.form.field.Base", {
	extend : "Ext.Component",
	mixins : {
		labelable : "Ext.form.Labelable",
		field : "Ext.form.field.Field"
	},
	alias : "widget.field",
	alternateClassName : ["Ext.form.Field", "Ext.form.BaseField"],
	requires : ["Ext.util.DelayedTask", "Ext.XTemplate",
			"Ext.layout.component.field.Field"],
	fieldSubTpl : ['<input id="{id}" type="{type}" ',
			'<tpl if="name">name="{name}" </tpl>',
			'<tpl if="size">size="{size}" </tpl>',
			'<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>',
			'class="{fieldCls} {typeCls}" autocomplete="off" />', {
				compiled : true,
				disableFormats : true
			}],
	inputType : "text",
	invalidText : "The value in this field is invalid",
	fieldCls : Ext.baseCSSPrefix + "form-field",
	focusCls : Ext.baseCSSPrefix + "form-focus",
	dirtyCls : Ext.baseCSSPrefix + "form-dirty",
	checkChangeEvents : Ext.isIE
			&& (!document.documentMode || document.documentMode < 9) ? [
			"change", "propertychange"] : ["change", "input", "textInput",
			"keyup", "dragdrop"],
	checkChangeBuffer : 50,
	componentLayout : "field",
	readOnly : false,
	readOnlyCls : Ext.baseCSSPrefix + "form-readonly",
	validateOnBlur : true,
	hasFocus : false,
	baseCls : Ext.baseCSSPrefix + "field",
	maskOnDisable : false,
	initComponent : function() {
		var a = this;
		a.callParent();
		a.subTplData = a.subTplData || {};
		a.addEvents("focus", "blur", "specialkey");
		a.initLabelable();
		a.initField();
		if (!a.name) {
			a.name = a.getInputId()
		}
	},
	getInputId : function() {
		return this.inputId || (this.inputId = Ext.id())
	},
	getSubTplData : function() {
		var c = this, b = c.inputType, a = c.getInputId();
		return Ext.applyIf(c.subTplData, {
					id : a,
					name : c.name || a,
					type : b,
					size : c.size || 20,
					cls : c.cls,
					fieldCls : c.fieldCls,
					tabIdx : c.tabIndex,
					typeCls : Ext.baseCSSPrefix + "form-"
							+ (b === "password" ? "text" : b)
				})
	},
	getSubTplMarkup : function() {
		return this.getTpl("fieldSubTpl").apply(this.getSubTplData())
	},
	initRenderTpl : function() {
		var a = this;
		if (!a.hasOwnProperty("renderTpl")) {
			a.renderTpl = a.getTpl("labelableRenderTpl")
		}
		return a.callParent()
	},
	initRenderData : function() {
		return Ext.applyIf(this.callParent(), this.getLabelableRenderData())
	},
	setFieldStyle : function(a) {
		var b = this, c = b.inputEl;
		if (c) {
			c.applyStyles(a)
		}
		b.fieldStyle = a
	},
	onRender : function() {
		var c = this, b = c.fieldStyle, a = c.renderSelectors;
		Ext.applyIf(a, c.getLabelableSelectors());
		Ext.applyIf(a, {
					inputEl : "." + c.fieldCls
				});
		c.callParent(arguments);
		c.setRawValue(c.rawValue);
		if (c.readOnly) {
			c.setReadOnly(true)
		}
		if (c.disabled) {
			c.disable()
		}
		if (b) {
			c.setFieldStyle(b)
		}
		c.renderActiveError()
	},
	initAria : function() {
		var a = this;
		a.callParent();
		a.getActionEl().dom.setAttribute("aria-describedby", Ext.id(a.errorEl))
	},
	getFocusEl : function() {
		return this.inputEl
	},
	isFileUpload : function() {
		return this.inputType === "file"
	},
	extractFileInput : function() {
		var b = this, a = b.isFileUpload() ? b.inputEl.dom : null, c;
		if (a) {
			c = a.cloneNode(true);
			a.parentNode.replaceChild(c, a);
			b.inputEl = Ext.get(c)
		}
		return a
	},
	getSubmitData : function() {
		var a = this, b = null, c;
		if (!a.disabled && a.submitValue && !a.isFileUpload()) {
			c = a.getSubmitValue();
			if (c !== null) {
				b = {};
				b[a.getName()] = c
			}
		}
		return b
	},
	getSubmitValue : function() {
		return this.processRawValue(this.getRawValue())
	},
	getRawValue : function() {
		var b = this, a = (b.inputEl ? b.inputEl.getValue() : Ext.value(
				b.rawValue, ""));
		b.rawValue = a;
		return a
	},
	setRawValue : function(b) {
		var a = this;
		b = Ext.value(b, "");
		a.rawValue = b;
		if (a.inputEl) {
			a.inputEl.dom.value = b
		}
		return b
	},
	valueToRaw : function(a) {
		return "" + Ext.value(a, "")
	},
	rawToValue : function(a) {
		return a
	},
	processRawValue : function(a) {
		return a
	},
	getValue : function() {
		var a = this, b = a.rawToValue(a.processRawValue(a.getRawValue()));
		a.value = b;
		return b
	},
	setValue : function(b) {
		var a = this;
		a.setRawValue(a.valueToRaw(b));
		return a.mixins.field.setValue.call(a, b)
	},
	onDisable : function() {
		var a = this, b = a.inputEl;
		a.callParent();
		if (b) {
			b.dom.disabled = true
		}
	},
	onEnable : function() {
		var a = this, b = a.inputEl;
		a.callParent();
		if (b) {
			b.dom.disabled = false
		}
	},
	setReadOnly : function(c) {
		var a = this, b = a.inputEl;
		if (b) {
			b.dom.readOnly = c;
			b.dom.setAttribute("aria-readonly", c)
		}
		a[c ? "addCls" : "removeCls"](a.readOnlyCls);
		a.readOnly = c
	},
	fireKey : function(a) {
		if (a.isSpecialKey()) {
			this.fireEvent("specialkey", this, Ext.create(
							"Ext.EventObjectImpl", a))
		}
	},
	initEvents : function() {
		var b = this, c = b.inputEl, a, d;
		if (c) {
			b.mon(c, Ext.EventManager.getKeyEvent(), b.fireKey, b);
			b.mon(c, "focus", b.onFocus, b);
			b.mon(c, "blur", b.onBlur, b, b.inEditor ? {
						buffer : 10
					} : null);
			a = Ext.create("Ext.util.DelayedTask", b.checkChange, b);
			b.onChangeEvent = d = function() {
				a.delay(b.checkChangeBuffer)
			};
			Ext.each(b.checkChangeEvents, function(e) {
						if (e === "propertychange") {
							b.usesPropertychange = true
						}
						b.mon(c, e, d)
					}, b)
		}
		b.callParent()
	},
	doComponentLayout : function() {
		var c = this, d = c.inputEl, a = c.usesPropertychange, b = "propertychange", e = c.onChangeEvent;
		if (a) {
			c.mun(d, b, e)
		}
		c.callParent(arguments);
		if (a) {
			c.mon(d, b, e)
		}
	},
	preFocus : Ext.emptyFn,
	onFocus : function() {
		var b = this, a = b.focusCls, c = b.inputEl;
		b.preFocus();
		if (a && c) {
			c.addCls(a)
		}
		if (!b.hasFocus) {
			b.hasFocus = true;
			b.fireEvent("focus", b)
		}
	},
	beforeBlur : Ext.emptyFn,
	onBlur : function() {
		var b = this, a = b.focusCls, c = b.inputEl;
		b.beforeBlur();
		if (a && c) {
			c.removeCls(a)
		}
		if (b.validateOnBlur) {
			b.validate()
		}
		b.hasFocus = false;
		b.fireEvent("blur", b);
		b.postBlur()
	},
	postBlur : Ext.emptyFn,
	onDirtyChange : function(a) {
		this[a ? "addCls" : "removeCls"](this.dirtyCls)
	},
	isValid : function() {
		var a = this;
		return a.disabled
				|| a.validateValue(a.processRawValue(a.getRawValue()))
	},
	validateValue : function(b) {
		var a = this, d = a.getErrors(b), c = Ext.isEmpty(d);
		if (!a.preventMark) {
			if (c) {
				a.clearInvalid()
			} else {
				a.markInvalid(d)
			}
		}
		return c
	},
	markInvalid : function(c) {
		var b = this, a = b.getActiveError();
		b.setActiveErrors(Ext.Array.from(c));
		if (a !== b.getActiveError()) {
			b.doComponentLayout()
		}
	},
	clearInvalid : function() {
		var b = this, a = b.hasActiveError();
		b.unsetActiveError();
		if (a) {
			b.doComponentLayout()
		}
	},
	renderActiveError : function() {
		var b = this, a = b.hasActiveError();
		if (b.inputEl) {
			b.inputEl[a ? "addCls" : "removeCls"](b.invalidCls + "-field")
		}
		b.mixins.labelable.renderActiveError.call(b)
	},
	getActionEl : function() {
		return this.inputEl || this.el
	}
});
Ext.define("Ext.form.field.Text", {
	extend : "Ext.form.field.Base",
	alias : "widget.textfield",
	requires : ["Ext.form.field.VTypes", "Ext.layout.component.field.Text"],
	alternateClassName : ["Ext.form.TextField", "Ext.form.Text"],
	size : 20,
	growMin : 30,
	growMax : 800,
	growAppend : "W",
	allowBlank : true,
	minLength : 0,
	maxLength : Number.MAX_VALUE,
	minLengthText : "The minimum length for this field is {0}",
	maxLengthText : "The maximum length for this field is {0}",
	blankText : "This field is required",
	regexText : "",
	emptyCls : Ext.baseCSSPrefix + "form-empty-field",
	ariaRole : "textbox",
	componentLayout : "textfield",
	initComponent : function() {
		this.callParent();
		this.addEvents("autosize", "keydown", "keyup", "keypress")
	},
	initEvents : function() {
		var b = this, a = b.inputEl;
		b.callParent();
		if (b.selectOnFocus || b.emptyText) {
			b.mon(a, "mousedown", b.onMouseDown, b)
		}
		if (b.maskRe
				|| (b.vtype && b.disableKeyFilter !== true && (b.maskRe = Ext.form.field.VTypes[b.vtype
						+ "Mask"]))) {
			b.mon(a, "keypress", b.filterKeys, b)
		}
		if (b.enableKeyEvents) {
			b.mon(a, {
						scope : b,
						keyup : b.onKeyUp,
						keydown : b.onKeyDown,
						keypress : b.onKeyPress
					})
		}
	},
	isEqual : function(b, a) {
		return String(Ext.value(b, "")) === String(Ext.value(a, ""))
	},
	onChange : function() {
		this.callParent();
		this.autoSize()
	},
	afterRender : function() {
		var a = this;
		if (a.enforceMaxLength) {
			a.inputEl.dom.maxLength = a.maxLength
		}
		a.applyEmptyText();
		a.autoSize();
		a.callParent()
	},
	onMouseDown : function(b) {
		var a = this;
		if (!a.hasFocus) {
			a.mon(a.inputEl, "mouseup", Ext.emptyFn, a, {
						single : true,
						preventDefault : true
					})
		}
	},
	processRawValue : function(b) {
		var a = this, d = a.stripCharsRe, c;
		if (d) {
			c = b.replace(d, "");
			if (c !== b) {
				a.setRawValue(c);
				b = c
			}
		}
		return b
	},
	onDisable : function() {
		this.callParent();
		if (Ext.isIE) {
			this.inputEl.dom.unselectable = "on"
		}
	},
	onEnable : function() {
		this.callParent();
		if (Ext.isIE) {
			this.inputEl.dom.unselectable = ""
		}
	},
	onKeyDown : function(a) {
		this.fireEvent("keydown", this, a)
	},
	onKeyUp : function(a) {
		this.fireEvent("keyup", this, a)
	},
	onKeyPress : function(a) {
		this.fireEvent("keypress", this, a)
	},
	reset : function() {
		this.callParent();
		this.applyEmptyText()
	},
	applyEmptyText : function() {
		var b = this, a = b.emptyText, c;
		if (b.rendered && a) {
			c = b.getRawValue().length < 1 && !b.hasFocus;
			if (Ext.supports.Placeholder) {
				b.inputEl.dom.placeholder = a
			} else {
				if (c) {
					b.setRawValue(a)
				}
			}
			if (c) {
				b.inputEl.addCls(b.emptyCls)
			}
			b.autoSize()
		}
	},
	preFocus : function() {
		var b = this, c = b.inputEl, a = b.emptyText, d;
		if (a && !Ext.supports.Placeholder && c.dom.value === a) {
			b.setRawValue("");
			d = true;
			c.removeCls(b.emptyCls)
		} else {
			if (Ext.supports.Placeholder) {
				b.inputEl.removeCls(b.emptyCls)
			}
		}
		if (b.selectOnFocus || d) {
			c.dom.select()
		}
	},
	onFocus : function() {
		var a = this;
		a.callParent(arguments);
		if (a.emptyText) {
			a.autoSize()
		}
	},
	postBlur : function() {
		this.applyEmptyText()
	},
	filterKeys : function(c) {
		if (c.ctrlKey) {
			return
		}
		var b = c.getKey(), a = String.fromCharCode(c.getCharCode());
		if (Ext.isGecko
				&& (c.isNavKeyPress() || b === c.BACKSPACE || (b === c.DELETE && c.button === -1))) {
			return
		}
		if (!Ext.isGecko && c.isSpecialKey() && !a) {
			return
		}
		if (!this.maskRe.test(a)) {
			c.stopEvent()
		}
	},
	getRawValue : function() {
		var b = this, a = b.callParent();
		if (a === b.emptyText) {
			a = ""
		}
		return a
	},
	setValue : function(b) {
		var a = this, c = a.inputEl;
		if (c && a.emptyText && !Ext.isEmpty(b)) {
			c.removeCls(a.emptyCls)
		}
		a.callParent(arguments);
		a.applyEmptyText();
		return a
	},
	getErrors : function(k) {
		var f = this, j = f.callParent(arguments), a = f.validator, d = f.emptyText, c = f.allowBlank, e = f.vtype, g = Ext.form.field.VTypes, h = f.regex, i = Ext.String.format, b;
		k = k || f.processRawValue(f.getRawValue());
		if (Ext.isFunction(a)) {
			b = a.call(f, k);
			if (b !== true) {
				j.push(b)
			}
		}
		if (k.length < 1 || k === d) {
			if (!c) {
				j.push(f.blankText)
			}
			return j
		}
		if (k.length < f.minLength) {
			j.push(i(f.minLengthText, f.minLength))
		}
		if (k.length > f.maxLength) {
			j.push(i(f.maxLengthText, f.maxLength))
		}
		if (e) {
			if (!g[e](k, f)) {
				j.push(f.vtypeText || g[e + "Text"])
			}
		}
		if (h && !h.test(k)) {
			j.push(f.regexText || f.invalidText)
		}
		return j
	},
	selectText : function(h, a) {
		var g = this, c = g.getRawValue(), d = true, f = g.inputEl.dom, e, b;
		if (c.length > 0) {
			h = h === e ? 0 : h;
			a = a === e ? c.length : a;
			if (f.setSelectionRange) {
				f.setSelectionRange(h, a)
			} else {
				if (f.createTextRange) {
					b = f.createTextRange();
					b.moveStart("character", h);
					b.moveEnd("character", a - c.length);
					b.select()
				}
			}
			d = Ext.isGecko || Ext.isOpera
		}
		if (d) {
			g.focus()
		}
	},
	autoSize : function() {
		var b = this, a;
		if (b.grow && b.rendered) {
			b.doComponentLayout();
			a = b.inputEl.getWidth();
			if (a !== b.lastInputWidth) {
				b.fireEvent("autosize", a);
				b.lastInputWidth = a
			}
		}
	},
	initAria : function() {
		this.callParent();
		this.getActionEl().dom.setAttribute("aria-required",
				this.allowBlank === false)
	},
	getBodyNaturalWidth : function() {
		return Math.round(this.size * 6.5) + 20
	}
});
Ext.define("Ext.form.field.TextArea", {
			extend : "Ext.form.field.Text",
			alias : ["widget.textareafield", "widget.textarea"],
			alternateClassName : "Ext.form.TextArea",
			requires : ["Ext.XTemplate", "Ext.layout.component.field.TextArea"],
			fieldSubTpl : ['<textarea id="{id}" ',
					'<tpl if="name">name="{name}" </tpl>',
					'<tpl if="rows">rows="{rows}" </tpl>',
					'<tpl if="cols">cols="{cols}" </tpl>',
					'<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>',
					'class="{fieldCls} {typeCls}" ', 'autocomplete="off">',
					"</textarea>", {
						compiled : true,
						disableFormats : true
					}],
			growMin : 60,
			growMax : 1000,
			growAppend : "\n-",
			cols : 20,
			rows : 4,
			enterIsSpecial : false,
			preventScrollbars : false,
			componentLayout : "textareafield",
			onRender : function(b, a) {
				var c = this;
				Ext.applyIf(c.subTplData, {
							cols : c.cols,
							rows : c.rows
						});
				c.callParent(arguments)
			},
			afterRender : function() {
				var a = this;
				a.callParent(arguments);
				if (a.grow) {
					if (a.preventScrollbars) {
						a.inputEl.setStyle("overflow", "hidden")
					}
					a.inputEl.setHeight(a.growMin)
				}
			},
			fireKey : function(a) {
				if (a.isSpecialKey()
						&& (this.enterIsSpecial || (a.getKey() !== a.ENTER || a
								.hasModifier()))) {
					this.fireEvent("specialkey", this, a)
				}
			},
			autoSize : function() {
				var b = this, a;
				if (b.grow && b.rendered) {
					b.doComponentLayout();
					a = b.inputEl.getHeight();
					if (a !== b.lastInputHeight) {
						b.fireEvent("autosize", a);
						b.lastInputHeight = a
					}
				}
			},
			initAria : function() {
				this.callParent(arguments);
				this.getActionEl().dom.setAttribute("aria-multiline", true)
			},
			getBodyNaturalWidth : function() {
				return Math.round(this.cols * 6.5) + 20
			}
		});
Ext.define("Ext.draw.Component", {
	alias : "widget.draw",
	extend : "Ext.Component",
	requires : ["Ext.draw.Surface", "Ext.layout.component.Draw"],
	enginePriority : ["Svg", "Vml"],
	baseCls : Ext.baseCSSPrefix + "surface",
	componentLayout : "draw",
	viewBox : true,
	autoSize : false,
	initComponent : function() {
		this.callParent(arguments);
		this.addEvents("mousedown", "mouseup", "mousemove", "mouseenter",
				"mouseleave", "click")
	},
	onRender : function() {
		var d = this, i = d.viewBox, b = d.autoSize, g, c, a, h, f, e;
		d.callParent(arguments);
		d.createSurface();
		c = d.surface.items;
		if (i || b) {
			g = c.getBBox();
			a = g.width;
			h = g.height;
			f = g.x;
			e = g.y;
			if (d.viewBox) {
				d.surface.setViewBox(f, e, a, h)
			} else {
				d.autoSizeSurface()
			}
		}
	},
	autoSizeSurface : function() {
		var d = this, b = d.surface.items, e = b.getBBox(), c = e.width, a = e.height;
		b.setAttributes({
					translate : {
						x : -e.x,
						y : -e.y + (+Ext.isOpera)
					}
				}, true);
		if (d.rendered) {
			d.setSize(c, a)
		} else {
			d.surface.setSize(c, a)
		}
		d.el.setSize(c, a)
	},
	createSurface : function() {
		var a = Ext.draw.Surface.create(Ext.apply({}, {
					width : this.width,
					height : this.height,
					renderTo : this.el
				}, this.initialConfig));
		this.surface = a;
		function b(c) {
			return function(d) {
				this.fireEvent(c, d)
			}
		}
		a.on({
					scope : this,
					mouseup : b("mouseup"),
					mousedown : b("mousedown"),
					mousemove : b("mousemove"),
					mouseenter : b("mouseenter"),
					mouseleave : b("mouseleave"),
					click : b("click")
				})
	},
	onDestroy : function() {
		var a = this.surface;
		if (a) {
			a.destroy()
		}
		this.callParent(arguments)
	}
});
Ext.define("Ext.chart.Chart", {
	alias : "widget.chart",
	extend : "Ext.draw.Component",
	mixins : {
		themeManager : "Ext.chart.theme.Theme",
		mask : "Ext.chart.Mask",
		navigation : "Ext.chart.Navigation"
	},
	requires : ["Ext.util.MixedCollection", "Ext.data.StoreManager",
			"Ext.chart.Legend", "Ext.util.DelayedTask"],
	viewBox : false,
	animate : false,
	legend : false,
	insetPadding : 10,
	enginePriority : ["Svg", "Vml"],
	background : false,
	constructor : function(b) {
		var c = this, a;
		c.initTheme(b.theme || c.theme);
		if (c.gradients) {
			Ext.apply(b, {
						gradients : c.gradients
					})
		}
		if (c.background) {
			Ext.apply(b, {
						background : c.background
					})
		}
		if (b.animate) {
			a = {
				easing : "ease",
				duration : 500
			};
			if (Ext.isObject(b.animate)) {
				b.animate = Ext.applyIf(b.animate, a)
			} else {
				b.animate = a
			}
		}
		c.mixins.mask.constructor.call(c, b);
		c.mixins.navigation.constructor.call(c, b);
		c.callParent([b])
	},
	initComponent : function() {
		var b = this, c, a;
		b.callParent();
		b.addEvents("itemmousedown", "itemmouseup", "itemmouseover",
				"itemmouseout", "itemclick", "itemdoubleclick",
				"itemdragstart", "itemdrag", "itemdragend", "beforerefresh",
				"refresh");
		Ext.applyIf(b, {
					zoom : {
						width : 1,
						height : 1,
						x : 0,
						y : 0
					}
				});
		b.maxGutter = [0, 0];
		b.store = Ext.data.StoreManager.lookup(b.store);
		c = b.axes;
		b.axes = Ext.create("Ext.util.MixedCollection", false, function(d) {
					return d.position
				});
		if (c) {
			b.axes.addAll(c)
		}
		a = b.series;
		b.series = Ext.create("Ext.util.MixedCollection", false, function(d) {
					return d.seriesId
							|| (d.seriesId = Ext.id(null, "ext-chart-series-"))
				});
		if (a) {
			b.series.addAll(a)
		}
		if (b.legend !== false) {
			b.legend = Ext.create("Ext.chart.Legend", Ext.applyIf({
								chart : b
							}, b.legend))
		}
		b.on({
					mousemove : b.onMouseMove,
					mouseleave : b.onMouseLeave,
					mousedown : b.onMouseDown,
					mouseup : b.onMouseUp,
					scope : b
				})
	},
	afterComponentLayout : function(b, a) {
		var c = this;
		if (Ext.isNumber(b) && Ext.isNumber(a)) {
			c.curWidth = b;
			c.curHeight = a;
			c.redraw(true)
		}
		this.callParent(arguments)
	},
	redraw : function(a) {
		var d = this, c = d.chartBBox = {
			x : 0,
			y : 0,
			height : d.curHeight,
			width : d.curWidth
		}, b = d.legend;
		d.surface.setSize(c.width, c.height);
		d.series.each(d.initializeSeries, d);
		d.axes.each(d.initializeAxis, d);
		d.axes.each(function(e) {
					e.processView()
				});
		d.axes.each(function(e) {
					e.drawAxis(true)
				});
		if (b !== false) {
			b.create()
		}
		d.alignAxes();
		if (d.legend !== false) {
			b.updatePosition()
		}
		d.getMaxGutter();
		d.resizing = !!a;
		d.axes.each(d.drawAxis, d);
		d.series.each(d.drawCharts, d);
		d.resizing = false
	},
	afterRender : function() {
		var b, a = this;
		this.callParent();
		if (a.categoryNames) {
			a.setCategoryNames(a.categoryNames)
		}
		if (a.tipRenderer) {
			b = a.getFunctionRef(a.tipRenderer);
			a.setTipRenderer(b.fn, b.scope)
		}
		a.bindStore(a.store, true);
		a.refresh()
	},
	getEventXY : function(d) {
		var c = this, b = this.surface.getRegion(), g = d.getXY(), a = g[0]
				- b.left, f = g[1] - b.top;
		return [a, f]
	},
	onClick : function(d) {
		var c = this, a = c.getEventXY(d), b;
		c.series.each(function(e) {
					if (Ext.draw.Draw.withinBox(a[0], a[1], e.bbox)) {
						if (e.getItemForPoint) {
							b = e.getItemForPoint(a[0], a[1]);
							if (b) {
								e.fireEvent("itemclick", b)
							}
						}
					}
				}, c)
	},
	onMouseDown : function(d) {
		var c = this, a = c.getEventXY(d), b;
		if (c.mask) {
			c.mixins.mask.onMouseDown.call(c, d)
		}
		c.series.each(function(e) {
					if (Ext.draw.Draw.withinBox(a[0], a[1], e.bbox)) {
						if (e.getItemForPoint) {
							b = e.getItemForPoint(a[0], a[1]);
							if (b) {
								e.fireEvent("itemmousedown", b)
							}
						}
					}
				}, c)
	},
	onMouseUp : function(d) {
		var c = this, a = c.getEventXY(d), b;
		if (c.mask) {
			c.mixins.mask.onMouseUp.call(c, d)
		}
		c.series.each(function(e) {
					if (Ext.draw.Draw.withinBox(a[0], a[1], e.bbox)) {
						if (e.getItemForPoint) {
							b = e.getItemForPoint(a[0], a[1]);
							if (b) {
								e.fireEvent("itemmouseup", b)
							}
						}
					}
				}, c)
	},
	onMouseMove : function(h) {
		var g = this, a = g.getEventXY(h), f, d, c, b;
		if (g.mask) {
			g.mixins.mask.onMouseMove.call(g, h)
		}
		g.series.each(function(e) {
			if (Ext.draw.Draw.withinBox(a[0], a[1], e.bbox)) {
				if (e.getItemForPoint) {
					f = e.getItemForPoint(a[0], a[1]);
					d = e._lastItemForPoint;
					c = e._lastStoreItem;
					b = e._lastStoreField;
					if (f !== d || f && (f.storeItem != c || f.storeField != b)) {
						if (d) {
							e.fireEvent("itemmouseout", d);
							delete e._lastItemForPoint;
							delete e._lastStoreField;
							delete e._lastStoreItem
						}
						if (f) {
							e.fireEvent("itemmouseover", f);
							e._lastItemForPoint = f;
							e._lastStoreItem = f.storeItem;
							e._lastStoreField = f.storeField
						}
					}
				}
			} else {
				d = e._lastItemForPoint;
				if (d) {
					e.fireEvent("itemmouseout", d);
					delete e._lastItemForPoint;
					delete e._lastStoreField;
					delete e._lastStoreItem
				}
			}
		}, g)
	},
	onMouseLeave : function(b) {
		var a = this;
		if (a.mask) {
			a.mixins.mask.onMouseLeave.call(a, b)
		}
		a.series.each(function(c) {
					delete c._lastItemForPoint
				})
	},
	delayRefresh : function() {
		var a = this;
		if (!a.refreshTask) {
			a.refreshTask = Ext.create("Ext.util.DelayedTask", a.refresh, a)
		}
		a.refreshTask.delay(a.refreshBuffer)
	},
	refresh : function() {
		var a = this;
		if (a.rendered && a.curWidth != undefined && a.curHeight != undefined) {
			if (a.fireEvent("beforerefresh", a) !== false) {
				a.redraw();
				a.fireEvent("refresh", a)
			}
		}
	},
	bindStore : function(a, b) {
		var c = this;
		if (!b && c.store) {
			if (a !== c.store && c.store.autoDestroy) {
				c.store.destroy()
			} else {
				c.store.un("datachanged", c.refresh, c);
				c.store.un("add", c.delayRefresh, c);
				c.store.un("remove", c.delayRefresh, c);
				c.store.un("update", c.delayRefresh, c);
				c.store.un("clear", c.refresh, c)
			}
		}
		if (a) {
			a = Ext.data.StoreManager.lookup(a);
			a.on({
						scope : c,
						datachanged : c.refresh,
						add : c.delayRefresh,
						remove : c.delayRefresh,
						update : c.delayRefresh,
						clear : c.refresh
					})
		}
		c.store = a;
		if (a && !b) {
			c.refresh()
		}
	},
	initializeAxis : function(b) {
		var e = this, j = e.chartBBox, i = j.width, d = j.height, g = j.x, f = j.y, c = e.themeAttrs, a = {
			chart : e
		};
		if (c) {
			a.axisStyle = Ext.apply({}, c.axis);
			a.axisLabelLeftStyle = Ext.apply({}, c.axisLabelLeft);
			a.axisLabelRightStyle = Ext.apply({}, c.axisLabelRight);
			a.axisLabelTopStyle = Ext.apply({}, c.axisLabelTop);
			a.axisLabelBottomStyle = Ext.apply({}, c.axisLabelBottom);
			a.axisTitleLeftStyle = Ext.apply({}, c.axisTitleLeft);
			a.axisTitleRightStyle = Ext.apply({}, c.axisTitleRight);
			a.axisTitleTopStyle = Ext.apply({}, c.axisTitleTop);
			a.axisTitleBottomStyle = Ext.apply({}, c.axisTitleBottom)
		}
		switch (b.position) {
			case "top" :
				Ext.apply(a, {
							length : i,
							width : d,
							x : g,
							y : f
						});
				break;
			case "bottom" :
				Ext.apply(a, {
							length : i,
							width : d,
							x : g,
							y : d
						});
				break;
			case "left" :
				Ext.apply(a, {
							length : d,
							width : i,
							x : g,
							y : d
						});
				break;
			case "right" :
				Ext.apply(a, {
							length : d,
							width : i,
							x : i,
							y : d
						});
				break
		}
		if (!b.chart) {
			Ext.apply(a, b);
			b = e.axes.replace(Ext.createByAlias(
					"axis." + b.type.toLowerCase(), a))
		} else {
			Ext.apply(b, a)
		}
	},
	alignAxes : function() {
		var f = this, g = f.axes, e = f.legend, b = ["top", "right", "bottom",
				"left"], d, c = f.insetPadding, a = {
			top : c,
			right : c,
			bottom : c,
			left : c
		};
		function h(k) {
			var j = g.findIndex("position", k);
			return (j < 0) ? null : g.getAt(j)
		}
		Ext.each(b, function(j) {
					var l = (j === "left" || j === "right"), i = h(j), k;
					if (e !== false) {
						if (e.position === j) {
							k = e.getBBox();
							a[j] += (l ? k.width : k.height) + a[j]
						}
					}
					if (i && i.bbox) {
						k = i.bbox;
						a[j] += (l ? k.width : k.height)
					}
				});
		d = {
			x : a.left,
			y : a.top,
			width : f.curWidth - a.left - a.right,
			height : f.curHeight - a.top - a.bottom
		};
		f.chartBBox = d;
		g.each(function(i) {
					var k = i.position, j = (k === "left" || k === "right");
					i.x = (k === "right" ? d.x + d.width : d.x);
					i.y = (k === "top" ? d.y : d.y + d.height);
					i.width = (j ? d.width : d.height);
					i.length = (j ? d.height : d.width)
				})
	},
	initializeSeries : function(g, j) {
		var h = this, d = h.themeAttrs, c, e, m, o, n, k = [], f = 0, b, a = {
			chart : h,
			seriesId : g.seriesId
		};
		if (d) {
			m = d.seriesThemes;
			n = d.markerThemes;
			c = Ext.apply({}, d.series);
			e = Ext.apply({}, d.marker);
			a.seriesStyle = Ext.apply(c, m[j % m.length]);
			a.seriesLabelStyle = Ext.apply({}, d.seriesLabel);
			a.markerStyle = Ext.apply(e, n[j % n.length]);
			if (d.colors) {
				a.colorArrayStyle = d.colors
			} else {
				k = [];
				for (b = m.length; f < b; f++) {
					o = m[f];
					if (o.fill || o.stroke) {
						k.push(o.fill || o.stroke)
					}
				}
				if (k.length) {
					a.colorArrayStyle = k
				}
			}
			a.seriesIdx = j
		}
		if (g instanceof Ext.chart.series.Series) {
			Ext.apply(g, a)
		} else {
			Ext.applyIf(a, g);
			g = h.series.replace(Ext.createByAlias("series."
							+ g.type.toLowerCase(), a))
		}
		if (g.initialize) {
			g.initialize()
		}
	},
	getMaxGutter : function() {
		var b = this, a = [0, 0];
		b.series.each(function(c) {
					var d = c.getGutters && c.getGutters() || [0, 0];
					a[0] = Math.max(a[0], d[0]);
					a[1] = Math.max(a[1], d[1])
				});
		b.maxGutter = a
	},
	drawAxis : function(a) {
		a.drawAxis()
	},
	drawCharts : function(a) {
		a.triggerafterrender = false;
		a.drawSeries();
		if (!this.animate) {
			a.fireEvent("afterrender")
		}
	},
	destroy : function() {
		this.surface.destroy();
		this.bindStore(null);
		this.callParent(arguments)
	}
});
Ext.define("Ext.chart.TipSurface", {
			extend : "Ext.draw.Component",
			spriteArray : false,
			renderFirst : true,
			constructor : function(a) {
				this.callParent([a]);
				if (a.sprites) {
					this.spriteArray = [].concat(a.sprites);
					delete a.sprites
				}
			},
			onRender : function() {
				var c = this, b = 0, a = 0, d, e;
				this.callParent(arguments);
				e = c.spriteArray;
				if (c.renderFirst && e) {
					c.renderFirst = false;
					for (a = e.length; b < a; b++) {
						d = c.surface.add(e[b]);
						d.setAttributes({
									hidden : false
								}, true)
					}
				}
			}
		});
Ext.define("Ext.chart.axis.Abstract", {
			requires : ["Ext.chart.Chart"],
			constructor : function(a) {
				a = a || {};
				var b = this, c = a.position || "left";
				c = c.charAt(0).toUpperCase() + c.substring(1);
				a.label = Ext.apply(a["axisLabel" + c + "Style"] || {}, a.label
								|| {});
				a.axisTitleStyle = Ext.apply(
						a["axisTitle" + c + "Style"] || {}, a.labelTitle || {});
				Ext.apply(b, a);
				b.fields = [].concat(b.fields);
				this.callParent();
				b.labels = [];
				b.getId();
				b.labelGroup = b.chart.surface.getGroup(b.axisId + "-labels")
			},
			alignment : null,
			grid : false,
			steps : 10,
			x : 0,
			y : 0,
			minValue : 0,
			maxValue : 0,
			getId : function() {
				return this.axisId || (this.axisId = Ext.id(null, "ext-axis-"))
			},
			processView : Ext.emptyFn,
			drawAxis : Ext.emptyFn,
			addDisplayAndLabels : Ext.emptyFn
		});
Ext.define("Ext.chart.axis.Axis", {
	extend : "Ext.chart.axis.Abstract",
	alternateClassName : "Ext.chart.Axis",
	requires : ["Ext.draw.Draw"],
	dashSize : 3,
	position : "bottom",
	skipFirst : false,
	length : 0,
	width : 0,
	majorTickSteps : false,
	applyData : Ext.emptyFn,
	calcEnds : function() {
		var v = this, c = Math, x = c.max, u = c.min, e = v.chart.substore
				|| v.chart.store, h = v.chart.series.items, m = v.fields, g = m.length, p = isNaN(v.minimum)
				? Infinity
				: v.minimum, t = isNaN(v.maximum) ? -Infinity : v.maximum, n = v.prevMin, q = v.prevMax, k = false, w = 0, b = [], j, d, s, o, a, f, r;
		for (s = 0, o = h.length; !k && s < o; s++) {
			k = k || h[s].stacked;
			b = h[s].__excludes || b
		}
		e.each(function(i) {
					if (k) {
						if (!isFinite(p)) {
							p = 0
						}
						for (a = [0, 0], s = 0; s < g; s++) {
							if (b[s]) {
								continue
							}
							f = i.get(m[s]);
							a[+(f > 0)] += c.abs(f)
						}
						t = x(t, -a[0], a[1]);
						p = u(p, -a[0], a[1])
					} else {
						for (s = 0; s < g; s++) {
							if (b[s]) {
								continue
							}
							value = i.get(m[s]);
							t = x(t, value);
							p = u(p, value)
						}
					}
				});
		if (!isFinite(t)) {
			t = v.prevMax || 0
		}
		if (!isFinite(p)) {
			p = v.prevMin || 0
		}
		if (p != t && (t != (t >> 0))) {
			t = (t >> 0) + 1
		}
		r = Ext.draw.Draw.snapEnds(p, t, v.majorTickSteps !== false
						? (v.majorTickSteps + 1)
						: v.steps);
		j = r.from;
		d = r.to;
		if (!isNaN(v.maximum)) {
			r.to = v.maximum
		}
		if (!isNaN(v.minimum)) {
			r.from = v.minimum
		}
		r.step = (r.to - r.from) / (d - j) * r.step;
		if (v.adjustMaximumByMajorUnit) {
			r.to += r.step
		}
		if (v.adjustMinimumByMajorUnit) {
			r.from -= r.step
		}
		v.prevMin = p == t ? 0 : p;
		v.prevMax = t;
		return r
	},
	drawAxis : function(t) {
		var E = this, u, s, h = E.x, g = E.y, C = E.chart.maxGutter[0], B = E.chart.maxGutter[1], e = E.dashSize, A = E.minorTickSteps
				|| 0, z = E.minorTickSteps || 0, b = E.length, F = E.position, f = [], m = false, c = E
				.applyData(), d = c.step, v = c.steps, r = c.from, a = c.to, w, q, p, o, n, l, k, D;
		if (E.hidden || isNaN(d) || (r == a)) {
			return
		}
		E.from = c.from;
		E.to = c.to;
		if (F == "left" || F == "right") {
			q = Math.floor(h) + 0.5;
			o = ["M", q, g, "l", 0, -b];
			w = b - (B * 2)
		} else {
			p = Math.floor(g) + 0.5;
			o = ["M", h, p, "l", b, 0];
			w = b - (C * 2)
		}
		D = w / (v || 1);
		l = Math.max(A + 1, 0);
		k = Math.max(z + 1, 0);
		if (E.type == "Numeric") {
			m = true;
			E.labels = [c.from]
		}
		if (F == "right" || F == "left") {
			p = g - B;
			q = h - ((F == "left") * e * 2);
			while (p >= g - B - w) {
				o.push("M", q, Math.floor(p) + 0.5, "l", e * 2 + 1, 0);
				if (p != g - B) {
					for (u = 1; u < k; u++) {
						o.push("M", q + e, Math.floor(p + D * u / k) + 0.5,
								"l", e + 1, 0)
					}
				}
				f.push([Math.floor(h), Math.floor(p)]);
				p -= D;
				if (m) {
					E.labels.push(E.labels[E.labels.length - 1] + d)
				}
				if (D === 0) {
					break
				}
			}
			if (Math.round(p + D - (g - B - w))) {
				o.push("M", q, Math.floor(g - b + B) + 0.5, "l", e * 2 + 1, 0);
				for (u = 1; u < k; u++) {
					o.push("M", q + e, Math.floor(g - b + B + D * u / k) + 0.5,
							"l", e + 1, 0)
				}
				f.push([Math.floor(h), Math.floor(p)]);
				if (m) {
					E.labels.push(E.labels[E.labels.length - 1] + d)
				}
			}
		} else {
			q = h + C;
			p = g - ((F == "top") * e * 2);
			while (q <= h + C + w) {
				o.push("M", Math.floor(q) + 0.5, p, "l", 0, e * 2 + 1);
				if (q != h + C) {
					for (u = 1; u < l; u++) {
						o.push("M", Math.floor(q - D * u / l) + 0.5, p, "l", 0,
								e + 1)
					}
				}
				f.push([Math.floor(q), Math.floor(g)]);
				q += D;
				if (m) {
					E.labels.push(E.labels[E.labels.length - 1] + d)
				}
				if (D === 0) {
					break
				}
			}
			if (Math.round(q - D - (h + C + w))) {
				o.push("M", Math.floor(h + b - C) + 0.5, p, "l", 0, e * 2 + 1);
				for (u = 1; u < l; u++) {
					o.push("M", Math.floor(h + b - C - D * u / l) + 0.5, p,
							"l", 0, e + 1)
				}
				f.push([Math.floor(q), Math.floor(g)]);
				if (m) {
					E.labels.push(E.labels[E.labels.length - 1] + d)
				}
			}
		}
		if (!E.axis) {
			E.axis = E.chart.surface.add(Ext.apply({
						type : "path",
						path : o
					}, E.axisStyle))
		}
		E.axis.setAttributes({
					path : o
				}, true);
		E.inflections = f;
		if (!t && E.grid) {
			E.drawGrid()
		}
		E.axisBBox = E.axis.getBBox();
		E.drawLabel()
	},
	drawGrid : function() {
		var t = this, n = t.chart.surface, b = t.grid, d = b.odd, e = b.even, g = t.inflections, j = g.length
				- ((d || e) ? 0 : 1), u = t.position, c = t.chart.maxGutter, m = t.width
				- 2, r = false, o, p, q = 1, l = [], f, a, h, k = [], s = [];
		if ((c[1] !== 0 && (u == "left" || u == "right"))
				|| (c[0] !== 0 && (u == "top" || u == "bottom"))) {
			q = 0;
			j++
		}
		for (; q < j; q++) {
			o = g[q];
			p = g[q - 1];
			if (d || e) {
				l = (q % 2) ? k : s;
				f = ((q % 2) ? d : e) || {};
				a = (f.lineWidth || f["stroke-width"] || 0) / 2;
				h = 2 * a;
				if (u == "left") {
					l.push("M", p[0] + 1 + a, p[1] + 0.5 - a, "L", p[0] + 1 + m
									- a, p[1] + 0.5 - a, "L", o[0] + 1 + m - a,
							o[1] + 0.5 + a, "L", o[0] + 1 + a, o[1] + 0.5 + a,
							"Z")
				} else {
					if (u == "right") {
						l.push("M", p[0] - a, p[1] + 0.5 - a, "L",
								p[0] - m + a, p[1] + 0.5 - a, "L",
								o[0] - m + a, o[1] + 0.5 + a, "L", o[0] - a,
								o[1] + 0.5 + a, "Z")
					} else {
						if (u == "top") {
							l.push("M", p[0] + 0.5 + a, p[1] + 1 + a, "L", p[0]
											+ 0.5 + a, p[1] + 1 + m - a, "L",
									o[0] + 0.5 - a, o[1] + 1 + m - a, "L", o[0]
											+ 0.5 - a, o[1] + 1 + a, "Z")
						} else {
							l.push("M", p[0] + 0.5 + a, p[1] - a, "L", p[0]
											+ 0.5 + a, p[1] - m + a, "L", o[0]
											+ 0.5 - a, o[1] - m + a, "L", o[0]
											+ 0.5 - a, o[1] - a, "Z")
						}
					}
				}
			} else {
				if (u == "left") {
					l = l.concat(["M", o[0] + 0.5, o[1] + 0.5, "l", m, 0])
				} else {
					if (u == "right") {
						l = l.concat(["M", o[0] - 0.5, o[1] + 0.5, "l", -m, 0])
					} else {
						if (u == "top") {
							l = l.concat(["M", o[0] + 0.5, o[1] + 0.5, "l", 0,
									m])
						} else {
							l = l.concat(["M", o[0] + 0.5, o[1] - 0.5, "l", 0,
									-m])
						}
					}
				}
			}
		}
		if (d || e) {
			if (k.length) {
				if (!t.gridOdd && k.length) {
					t.gridOdd = n.add({
								type : "path",
								path : k
							})
				}
				t.gridOdd.setAttributes(Ext.apply({
									path : k,
									hidden : false
								}, d || {}), true)
			}
			if (s.length) {
				if (!t.gridEven) {
					t.gridEven = n.add({
								type : "path",
								path : s
							})
				}
				t.gridEven.setAttributes(Ext.apply({
									path : s,
									hidden : false
								}, e || {}), true)
			}
		} else {
			if (l.length) {
				if (!t.gridLines) {
					t.gridLines = t.chart.surface.add({
								type : "path",
								path : l,
								"stroke-width" : t.lineWidth || 1,
								stroke : t.gridColor || "#ccc"
							})
				}
				t.gridLines.setAttributes({
							hidden : false,
							path : l
						}, true)
			} else {
				if (t.gridLines) {
					t.gridLines.hide(true)
				}
			}
		}
	},
	getOrCreateLabel : function(c, f) {
		var d = this, b = d.labelGroup, e = b.getAt(c), a = d.chart.surface;
		if (e) {
			if (f != e.attr.text) {
				e.setAttributes(Ext.apply({
									text : f
								}, d.label), true);
				e._bbox = e.getBBox()
			}
		} else {
			e = a.add(Ext.apply({
						group : b,
						type : "text",
						x : 0,
						y : 0,
						text : f
					}, d.label));
			a.renderItem(e);
			e._bbox = e.getBBox()
		}
		if (d.label.rotation) {
			e.setAttributes({
						rotation : {
							degrees : 0
						}
					}, true);
			e._ubbox = e.getBBox();
			e.setAttributes(d.label, true)
		} else {
			e._ubbox = e._bbox
		}
		return e
	},
	rect2pointArray : function(k) {
		var b = this.chart.surface, f = b.getBBox(k, true), l = [f.x, f.y], d = l
				.slice(), j = [f.x + f.width, f.y], a = j.slice(), i = [
				f.x + f.width, f.y + f.height], e = i.slice(), h = [f.x,
				f.y + f.height], c = h.slice(), g = k.matrix;
		l[0] = g.x.apply(g, d);
		l[1] = g.y.apply(g, d);
		j[0] = g.x.apply(g, a);
		j[1] = g.y.apply(g, a);
		i[0] = g.x.apply(g, e);
		i[1] = g.y.apply(g, e);
		h[0] = g.x.apply(g, c);
		h[1] = g.y.apply(g, c);
		return [l, j, i, h]
	},
	intersect : function(c, a) {
		var d = this.rect2pointArray(c), b = this.rect2pointArray(a);
		return !!Ext.draw.Draw.intersect(d, b).length
	},
	drawHorizontalLabels : function() {
		var E = this, c = E.label, z = Math.floor, v = Math.max, w = E.chart.axes, F = E.position, j = E.inflections, n = j.length, D = E.labels, q = E.labelGroup, r = 0, f, B = E.chart.maxGutter[1], d, a, t, e, m, A = 0, C, s, h, p, g, l, o, k, u, b;
		l = n - 1;
		t = j[0];
		b = E.getOrCreateLabel(0, E.label.renderer(D[0]));
		f = Math.abs(Math.sin(c.rotate && (c.rotate.degrees * Math.PI / 180)
				|| 0)) >> 0;
		for (u = 0; u < n; u++) {
			t = j[u];
			p = E.label.renderer(D[u]);
			C = E.getOrCreateLabel(u, p);
			a = C._bbox;
			r = v(r, a.height + E.dashSize + E.label.padding);
			o = z(t[0] - (f ? a.height : a.width) / 2);
			if (E.chart.maxGutter[0] == 0) {
				if (u == 0 && w.findIndex("position", "left") == -1) {
					o = t[0]
				} else {
					if (u == l && w.findIndex("position", "right") == -1) {
						o = t[0] - a.width
					}
				}
			}
			if (F == "top") {
				k = t[1] - (E.dashSize * 2) - E.label.padding - (a.height / 2)
			} else {
				k = t[1] + (E.dashSize * 2) + E.label.padding + (a.height / 2)
			}
			C.setAttributes({
						hidden : false,
						x : o,
						y : k
					}, true);
			if (u != 0 && (E.intersect(C, m) || E.intersect(C, b))) {
				C.hide(true);
				continue
			}
			m = C
		}
		return r
	},
	drawVerticalLabels : function() {
		var A = this, f = A.inflections, B = A.position, j = f.length, w = A.labels, t = 0, q = Math.max, s = Math.floor, b = Math.ceil, r = A.chart.axes, u = A.chart.maxGutter[1], c, a, o, k, v = 0, z, n, e, m, d, h, l, g, p;
		h = j;
		for (p = 0; p < h; p++) {
			o = f[p];
			m = A.label.renderer(w[p]);
			z = A.getOrCreateLabel(p, m);
			a = z._bbox;
			t = q(t, a.width + A.dashSize + A.label.padding);
			g = o[1];
			if (u < a.height / 2) {
				if (p == h - 1 && r.findIndex("position", "top") == -1) {
					g = A.y - A.length + b(a.height / 2)
				} else {
					if (p == 0 && r.findIndex("position", "bottom") == -1) {
						g = A.y - s(a.height / 2)
					}
				}
			}
			if (B == "left") {
				l = o[0] - a.width - A.dashSize - A.label.padding - 2
			} else {
				l = o[0] + A.dashSize + A.label.padding + 2
			}
			z.setAttributes(Ext.apply({
								hidden : false,
								x : l,
								y : g
							}, A.label), true);
			if (p != 0 && A.intersect(z, k)) {
				z.hide(true);
				continue
			}
			k = z
		}
		return t
	},
	drawLabel : function() {
		var g = this, a = g.position, b = g.labelGroup, h = g.inflections, f = 0, e = 0, d, c;
		if (a == "left" || a == "right") {
			f = g.drawVerticalLabels()
		} else {
			e = g.drawHorizontalLabels()
		}
		d = b.getCount();
		c = h.length;
		for (; c < d; c++) {
			b.getAt(c).hide(true)
		}
		g.bbox = {};
		Ext.apply(g.bbox, g.axisBBox);
		g.bbox.height = e;
		g.bbox.width = f;
		if (Ext.isString(g.title)) {
			g.drawTitle(f, e)
		}
	},
	elipsis : function(d, g, c, e, b) {
		var f, a;
		if (c < e) {
			d.hide(true);
			return false
		}
		while (g.length > 4) {
			g = g.substr(0, g.length - 4) + "...";
			d.setAttributes({
						text : g
					}, true);
			f = d.getBBox();
			if (f.width < c) {
				if (typeof b == "number") {
					d.setAttributes({
								x : Math.floor(b - (f.width / 2))
							}, true)
				}
				break
			}
		}
		return true
	},
	setTitle : function(a) {
		this.title = a;
		this.drawLabel()
	},
	drawTitle : function(k, l) {
		var g = this, f = g.position, b = g.chart.surface, c = g.displaySprite, j = g.title, e = (f == "left" || f == "right"), i = g.x, h = g.y, a, m, d;
		if (c) {
			c.setAttributes({
						text : j
					}, true)
		} else {
			a = {
				type : "text",
				x : 0,
				y : 0,
				text : j
			};
			c = g.displaySprite = b.add(Ext.apply(a, g.axisTitleStyle,
					g.labelTitle));
			b.renderItem(c)
		}
		m = c.getBBox();
		d = g.dashSize + g.label.padding;
		if (e) {
			h -= ((g.length / 2) - (m.height / 2));
			if (f == "left") {
				i -= (k + d + (m.width / 2))
			} else {
				i += (k + d + m.width - (m.width / 2))
			}
			g.bbox.width += m.width + 10
		} else {
			i += (g.length / 2) - (m.width * 0.5);
			if (f == "top") {
				h -= (l + d + (m.height * 0.3))
			} else {
				h += (l + d + (m.height * 0.8))
			}
			g.bbox.height += m.height + 10
		}
		c.setAttributes({
					translate : {
						x : i,
						y : h
					}
				}, true)
	}
});
Ext.define("Ext.chart.axis.Category", {
			extend : "Ext.chart.axis.Axis",
			alternateClassName : "Ext.chart.CategoryAxis",
			alias : "axis.category",
			categoryNames : null,
			calculateCategoryCount : false,
			setLabels : function() {
				var b = this.chart.store, a = this.fields, d = a.length, c;
				this.labels = [];
				b.each(function(e) {
							for (c = 0; c < d; c++) {
								this.labels.push(e.get(a[c]))
							}
						}, this)
			},
			applyData : function() {
				this.callParent();
				this.setLabels();
				var a = this.chart.store.getCount();
				return {
					from : 0,
					to : a,
					power : 1,
					step : 1,
					steps : a - 1
				}
			}
		});
Ext.define("Ext.chart.axis.Gauge", {
	extend : "Ext.chart.axis.Abstract",
	position : "gauge",
	alias : "axis.gauge",
	drawAxis : function(p) {
		var h = this.chart, a = h.surface, o = h.chartBBox, d = o.x
				+ (o.width / 2), b = o.y + o.height, c = this.margin || 10, l = Math
				.min(o.width, 2 * o.height)
				/ 2 + c, g = [], m, k = this.steps, e, f = Math.PI, n = Math.cos, j = Math.sin;
		if (this.sprites && !h.resizing) {
			this.drawLabel();
			return
		}
		if (this.margin >= 0) {
			if (!this.sprites) {
				for (e = 0; e <= k; e++) {
					m = a.add({
								type : "path",
								path : ["M", d + (l - c) * n(e / k * f - f),
										b + (l - c) * j(e / k * f - f), "L",
										d + l * n(e / k * f - f),
										b + l * j(e / k * f - f), "Z"],
								stroke : "#ccc"
							});
					m.setAttributes({
								hidden : false
							}, true);
					g.push(m)
				}
			} else {
				g = this.sprites;
				for (e = 0; e <= k; e++) {
					g[e].setAttributes({
								path : ["M", d + (l - c) * n(e / k * f - f),
										b + (l - c) * j(e / k * f - f), "L",
										d + l * n(e / k * f - f),
										b + l * j(e / k * f - f), "Z"],
								stroke : "#ccc"
							}, true)
				}
			}
		}
		this.sprites = g;
		this.drawLabel();
		if (this.title) {
			this.drawTitle()
		}
	},
	drawTitle : function() {
		var e = this, d = e.chart, a = d.surface, f = d.chartBBox, c = e.titleSprite, b;
		if (!c) {
			e.titleSprite = c = a.add({
						type : "text",
						zIndex : 2
					})
		}
		c.setAttributes(Ext.apply({
							text : e.title
						}, e.label || {}), true);
		b = c.getBBox();
		c.setAttributes({
					x : f.x + (f.width / 2) - (b.width / 2),
					y : f.y + f.height - (b.height / 2) - 4
				}, true)
	},
	setTitle : function(a) {
		this.title = a;
		this.drawTitle()
	},
	drawLabel : function() {
		var j = this.chart, n = j.surface, b = j.chartBBox, h = b.x
				+ (b.width / 2), g = b.y + b.height, k = this.margin || 10, d = Math
				.min(b.width, 2 * b.height)
				/ 2 + 2 * k, s = Math.round, l = [], f, q = this.maximum || 0, p = this.steps, o = 0, t, r = Math.PI, c = Math.cos, a = Math.sin, e = this.label, m = e.renderer
				|| function(i) {
					return i
				};
		if (!this.labelArray) {
			for (o = 0; o <= p; o++) {
				t = (o === 0 || o === p) ? 7 : 0;
				f = n.add({
							type : "text",
							text : m(s(o / p * q)),
							x : h + d * c(o / p * r - r),
							y : g + d * a(o / p * r - r) - t,
							"text-anchor" : "middle",
							"stroke-width" : 0.2,
							zIndex : 10,
							stroke : "#333"
						});
				f.setAttributes({
							hidden : false
						}, true);
				l.push(f)
			}
		} else {
			l = this.labelArray;
			for (o = 0; o <= p; o++) {
				t = (o === 0 || o === p) ? 7 : 0;
				l[o].setAttributes({
							text : m(s(o / p * q)),
							x : h + d * c(o / p * r - r),
							y : g + d * a(o / p * r - r) - t
						}, true)
			}
		}
		this.labelArray = l
	}
});
Ext.define("Ext.chart.axis.Numeric", {
			extend : "Ext.chart.axis.Axis",
			alternateClassName : "Ext.chart.NumericAxis",
			type : "numeric",
			alias : "axis.numeric",
			constructor : function(b) {
				var c = this, a, d;
				c.callParent([b]);
				a = c.label;
				if (c.roundToDecimal === false) {
					return
				}
				if (a.renderer) {
					d = a.renderer;
					a.renderer = function(e) {
						return c.roundToDecimal(d(e), c.decimals)
					}
				} else {
					a.renderer = function(e) {
						return c.roundToDecimal(e, c.decimals)
					}
				}
			},
			roundToDecimal : function(a, c) {
				var b = Math.pow(10, c || 0);
				return ((a * b) >> 0) / b
			},
			minimum : NaN,
			maximum : NaN,
			decimals : 2,
			scale : "linear",
			position : "left",
			adjustMaximumByMajorUnit : false,
			adjustMinimumByMajorUnit : false,
			applyData : function() {
				this.callParent();
				return this.calcEnds()
			}
		});
Ext.define("Ext.chart.axis.Radial", {
	extend : "Ext.chart.axis.Abstract",
	position : "radial",
	alias : "axis.radial",
	drawAxis : function(t) {
		var k = this.chart, a = k.surface, s = k.chartBBox, p = k.store, b = p
				.getCount(), e = s.x + (s.width / 2), c = s.y + (s.height / 2), o = Math
				.min(s.width, s.height)
				/ 2, h = [], q, n = this.steps, f, d, g = Math.PI * 2, r = Math.cos, m = Math.sin;
		if (this.sprites && !k.resizing) {
			this.drawLabel();
			return
		}
		if (!this.sprites) {
			for (f = 1; f <= n; f++) {
				q = a.add({
							type : "circle",
							x : e,
							y : c,
							radius : Math.max(o * f / n, 0),
							stroke : "#ccc"
						});
				q.setAttributes({
							hidden : false
						}, true);
				h.push(q)
			}
			p.each(function(l, j) {
						q = a.add({
									type : "path",
									path : ["M", e, c, "L",
											e + o * r(j / b * g),
											c + o * m(j / b * g), "Z"],
									stroke : "#ccc"
								});
						q.setAttributes({
									hidden : false
								}, true);
						h.push(q)
					})
		} else {
			h = this.sprites;
			for (f = 0; f < n; f++) {
				h[f].setAttributes({
							x : e,
							y : c,
							radius : Math.max(o * (f + 1) / n, 0),
							stroke : "#ccc"
						}, true)
			}
			p.each(function(l, i) {
						h[f + i].setAttributes({
									path : ["M", e, c, "L",
											e + o * r(i / b * g),
											c + o * m(i / b * g), "Z"],
									stroke : "#ccc"
								}, true)
					})
		}
		this.sprites = h;
		this.drawLabel()
	},
	drawLabel : function() {
		var q = this.chart, w = q.surface, b = q.chartBBox, g = q.store, l = b.x
				+ (b.width / 2), k = b.y + (b.height / 2), e = Math.min(
				b.width, b.height)
				/ 2, A = Math.max, D = Math.round, r = [], h, u = [], c, v = [], f, s = !this.maximum, C = this.maximum
				|| 0, B = this.steps, z = 0, y, o, n, t = Math.PI * 2, d = Math.cos, a = Math.sin, x = this.label.display, m = x !== "none", p = 10;
		if (!m) {
			return
		}
		q.series.each(function(i) {
					u.push(i.yField);
					f = i.xField
				});
		g.each(function(j, E) {
					if (s) {
						for (E = 0, c = u.length; E < c; E++) {
							C = A(+j.get(u[E]), C)
						}
					}
					v.push(j.get(f))
				});
		if (!this.labelArray) {
			if (x != "categories") {
				for (z = 1; z <= B; z++) {
					h = w.add({
								type : "text",
								text : D(z / B * C),
								x : l,
								y : k - e * z / B,
								"text-anchor" : "middle",
								"stroke-width" : 0.1,
								stroke : "#333"
							});
					h.setAttributes({
								hidden : false
							}, true);
					r.push(h)
				}
			}
			if (x != "scale") {
				for (y = 0, B = v.length; y < B; y++) {
					o = d(y / B * t) * (e + p);
					n = a(y / B * t) * (e + p);
					h = w.add({
								type : "text",
								text : v[y],
								x : l + o,
								y : k + n,
								"text-anchor" : o * o <= 0.001
										? "middle"
										: (o < 0 ? "end" : "start")
							});
					h.setAttributes({
								hidden : false
							}, true);
					r.push(h)
				}
			}
		} else {
			r = this.labelArray;
			if (x != "categories") {
				for (z = 0; z < B; z++) {
					r[z].setAttributes({
								text : D((z + 1) / B * C),
								x : l,
								y : k - e * (z + 1) / B,
								"text-anchor" : "middle",
								"stroke-width" : 0.1,
								stroke : "#333"
							}, true)
				}
			}
			if (x != "scale") {
				for (y = 0, B = v.length; y < B; y++) {
					o = d(y / B * t) * (e + p);
					n = a(y / B * t) * (e + p);
					if (r[z + y]) {
						r[z + y].setAttributes({
									type : "text",
									text : v[y],
									x : l + o,
									y : k + n,
									"text-anchor" : o * o <= 0.001
											? "middle"
											: (o < 0 ? "end" : "start")
								}, true)
					}
				}
			}
		}
		this.labelArray = r
	}
});
Ext.define("Ext.picker.Color", {
	extend : "Ext.Component",
	requires : "Ext.XTemplate",
	alias : "widget.colorpicker",
	alternateClassName : "Ext.ColorPalette",
	componentCls : Ext.baseCSSPrefix + "color-picker",
	selectedCls : Ext.baseCSSPrefix + "color-picker-selected",
	value : null,
	clickEvent : "click",
	allowReselect : false,
	colors : ["000000", "993300", "333300", "003300", "003366", "000080",
			"333399", "333333", "800000", "FF6600", "808000", "008000",
			"008080", "0000FF", "666699", "808080", "FF0000", "FF9900",
			"99CC00", "339966", "33CCCC", "3366FF", "800080", "969696",
			"FF00FF", "FFCC00", "FFFF00", "00FF00", "00FFFF", "00CCFF",
			"993366", "C0C0C0", "FF99CC", "FFCC99", "FFFF99", "CCFFCC",
			"CCFFFF", "99CCFF", "CC99FF", "FFFFFF"],
	colorRe : /(?:^|\s)color-(.{6})(?:\s|$)/,
	constructor : function() {
		this.renderTpl = Ext
				.create(
						"Ext.XTemplate",
						'<tpl for="colors"><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');
		this.callParent(arguments)
	},
	initComponent : function() {
		var a = this;
		this.callParent(arguments);
		a.addEvents("select");
		if (a.handler) {
			a.on("select", a.handler, a.scope, true)
		}
	},
	onRender : function(c, b) {
		var d = this, a = d.clickEvent;
		Ext.apply(d.renderData, {
					itemCls : d.itemCls,
					colors : d.colors
				});
		this.callParent(arguments);
		d.mon(d.el, a, d.handleClick, d, {
					delegate : "a"
				});
		if (a != "click") {
			d.mon(d.el, "click", Ext.emptyFn, d, {
						delegate : "a",
						stopEvent : true
					})
		}
	},
	afterRender : function() {
		var a = this, b;
		this.callParent(arguments);
		if (a.value) {
			b = a.value;
			a.value = null;
			a.select(b, true)
		}
	},
	handleClick : function(c, d) {
		var b = this, a;
		c.stopEvent();
		if (!b.disabled) {
			a = d.className.match(b.colorRe)[1];
			b.select(a.toUpperCase())
		}
	},
	select : function(b, a) {
		var d = this, f = d.selectedCls, e = d.value, c;
		b = b.replace("#", "");
		if (!d.rendered) {
			d.value = b;
			return
		}
		if (b != e || d.allowReselect) {
			c = d.el;
			if (d.value) {
				c.down("a.color-" + e).removeCls(f)
			}
			c.down("a.color-" + b).addCls(f);
			d.value = b;
			if (a !== true) {
				d.fireEvent("select", d, b)
			}
		}
	},
	getValue : function() {
		return this.value || null
	}
});
Ext.define("Ext.toolbar.Item", {
			extend : "Ext.Component",
			alias : "widget.tbitem",
			alternateClassName : "Ext.Toolbar.Item",
			enable : Ext.emptyFn,
			disable : Ext.emptyFn,
			focus : Ext.emptyFn
		});
Ext.define("Ext.container.AbstractContainer", {
	extend : "Ext.Component",
	requires : ["Ext.util.MixedCollection", "Ext.layout.container.Auto",
			"Ext.ZIndexManager"],
	suspendLayout : false,
	autoDestroy : true,
	defaultType : "panel",
	isContainer : true,
	baseCls : Ext.baseCSSPrefix + "container",
	bubbleEvents : ["add", "remove"],
	initComponent : function() {
		var a = this;
		a.addEvents("afterlayout", "beforeadd", "beforeremove", "add",
				"remove", "beforecardswitch", "cardswitch");
		a.layoutOnShow = Ext.create("Ext.util.MixedCollection");
		a.callParent();
		a.initItems()
	},
	initItems : function() {
		var b = this, a = b.items;
		b.items = Ext.create("Ext.util.MixedCollection", false,
				b.getComponentId);
		if (a) {
			if (!Ext.isArray(a)) {
				a = [a]
			}
			b.add(a)
		}
	},
	afterRender : function() {
		this.getLayout();
		this.callParent()
	},
	setLayout : function(b) {
		var a = this.layout;
		if (a && a.isLayout && a != b) {
			a.setOwner(null)
		}
		this.layout = b;
		b.setOwner(this)
	},
	getLayout : function() {
		var a = this;
		if (!a.layout || !a.layout.isLayout) {
			a.setLayout(Ext.layout.Layout.create(a.layout, "autocontainer"))
		}
		return a.layout
	},
	doLayout : function() {
		var b = this, a = b.getLayout();
		if (b.rendered && a && !b.suspendLayout) {
			if ((!Ext.isNumber(b.width) || !Ext.isNumber(b.height))
					&& b.componentLayout.type !== "autocomponent") {
				if (b.componentLayout.layoutBusy !== true) {
					b.doComponentLayout();
					if (b.componentLayout.layoutCancelled === true) {
						a.layout()
					}
				}
			} else {
				if (a.layoutBusy !== true) {
					a.layout()
				}
			}
		}
		return b
	},
	afterLayout : function(a) {
		this.fireEvent("afterlayout", this, a)
	},
	prepareItems : function(b, d) {
		if (!Ext.isArray(b)) {
			b = [b]
		}
		var c = 0, a = b.length, e;
		for (; c < a; c++) {
			e = b[c];
			if (d) {
				e = this.applyDefaults(e)
			}
			b[c] = this.lookupComponent(e)
		}
		return b
	},
	applyDefaults : function(a) {
		var b = this.defaults;
		if (b) {
			if (Ext.isFunction(b)) {
				b = b.call(this, a)
			}
			if (Ext.isString(a)) {
				a = Ext.ComponentManager.get(a);
				Ext.applyIf(a, b)
			} else {
				if (!a.isComponent) {
					Ext.applyIf(a, b)
				} else {
					Ext.applyIf(a, b)
				}
			}
		}
		return a
	},
	lookupComponent : function(a) {
		return Ext.isString(a) ? Ext.ComponentManager.get(a) : this
				.createComponent(a)
	},
	createComponent : function(a, b) {
		return Ext.ComponentManager.create(a, b || this.defaultType)
	},
	getComponentId : function(a) {
		return a.getItemId()
	},
	add : function() {
		var h = this, f = Array.prototype.slice.call(arguments), a, g, b = [], c, e, k, d = -1, j;
		if (typeof f[0] == "number") {
			d = f.shift()
		}
		a = f.length > 1;
		if (a || Ext.isArray(f[0])) {
			g = a ? f : f[0];
			h.suspendLayout = true;
			for (c = 0, e = g.length; c < e; c++) {
				k = g[c];
				if (d != -1) {
					k = h.add(d + c, k)
				} else {
					k = h.add(k)
				}
				b.push(k)
			}
			h.suspendLayout = false;
			h.doLayout();
			return b
		}
		j = h.prepareItems(f[0], true)[0];
		if (j.floating) {
			j.onAdded(h, d)
		} else {
			d = (d !== -1) ? d : h.items.length;
			if (h.fireEvent("beforeadd", h, j, d) !== false
					&& h.onBeforeAdd(j) !== false) {
				h.items.insert(d, j);
				j.onAdded(h, d);
				h.onAdd(j, d);
				h.fireEvent("add", h, j, d)
			}
			h.doLayout()
		}
		return j
	},
	registerFloatingItem : function(b) {
		var a = this;
		if (!a.floatingItems) {
			a.floatingItems = Ext.create("Ext.ZIndexManager", a)
		}
		a.floatingItems.register(b)
	},
	onAdd : Ext.emptyFn,
	onRemove : Ext.emptyFn,
	insert : function(b, a) {
		return this.add(b, a)
	},
	move : function(b, d) {
		var a = this.items, c;
		c = a.removeAt(b);
		if (c === false) {
			return false
		}
		a.insert(d, c);
		this.doLayout();
		return c
	},
	onBeforeAdd : function(b) {
		var a = this;
		if (b.ownerCt) {
			b.ownerCt.remove(b, false)
		}
		if (a.border === false || a.border === 0) {
			b.border = (b.border === true)
		}
	},
	remove : function(a, b) {
		var d = this, e = d.getComponent(a);
		if (e && d.fireEvent("beforeremove", d, e) !== false) {
			d.doRemove(e, b);
			d.fireEvent("remove", d, e)
		}
		return e
	},
	doRemove : function(c, b) {
		var e = this, d = e.layout, a = d && e.rendered;
		e.items.remove(c);
		c.onRemoved();
		if (a) {
			d.onRemove(c)
		}
		e.onRemove(c, b);
		if (b === true || (b !== false && e.autoDestroy)) {
			c.destroy()
		}
		if (a && !b) {
			d.afterRemove(c)
		}
		if (!e.destroying) {
			e.doLayout()
		}
	},
	removeAll : function(c) {
		var g = this, e = g.items.items.slice(), b = [], d = 0, a = e.length, f;
		g.suspendLayout = true;
		for (; d < a; d++) {
			f = e[d];
			g.remove(f, c);
			if (f.ownerCt !== g) {
				b.push(f)
			}
		}
		g.suspendLayout = false;
		g.doLayout();
		return b
	},
	getRefItems : function(c) {
		var g = this, d = g.items.items, b = d.length, e = 0, f, a = [];
		for (; e < b; e++) {
			f = d[e];
			a.push(f);
			if (c && f.getRefItems) {
				a.push.apply(a, f.getRefItems(true))
			}
		}
		if (g.floatingItems && g.floatingItems.accessList) {
			a.push.apply(a, g.floatingItems.accessList)
		}
		return a
	},
	cascade : function(k, l, a) {
		var j = this, e = j.items ? j.items.items : [], f = e.length, d = 0, h, g = a
				? a.concat(j)
				: [j], b = g.length - 1;
		if (k.apply(l || j, g) !== false) {
			for (; d < f; d++) {
				h = e[d];
				if (h.cascade) {
					h.cascade(k, l, a)
				} else {
					g[b] = h;
					k.apply(l || e, g)
				}
			}
		}
		return this
	},
	getComponent : function(a) {
		if (Ext.isObject(a)) {
			a = a.getItemId()
		}
		return this.items.get(a)
	},
	query : function(a) {
		return Ext.ComponentQuery.query(a, this)
	},
	child : function(a) {
		return this.query("> " + a)[0] || null
	},
	down : function(a) {
		return this.query(a)[0] || null
	},
	show : function() {
		this.callParent(arguments);
		this.performDeferredLayouts();
		return this
	},
	performDeferredLayouts : function() {
		var e = this.layoutOnShow, d = e.getCount(), b = 0, a, c;
		for (; b < d; b++) {
			c = e.get(b);
			a = c.needsLayout;
			if (Ext.isObject(a)) {
				c.doComponentLayout(a.width, a.height, a.isSetSize, a.ownerCt)
			}
		}
		e.clear()
	},
	onEnable : function() {
		Ext.Array.each(this.query("[isFormField]"), function(a) {
					if (a.resetDisable) {
						a.enable();
						delete a.resetDisable
					}
				});
		this.callParent()
	},
	onDisable : function() {
		Ext.Array.each(this.query("[isFormField]"), function(a) {
					if (a.resetDisable !== false && !a.disabled) {
						a.disable();
						a.resetDisable = true
					}
				});
		this.callParent()
	},
	beforeLayout : function() {
		return true
	},
	beforeDestroy : function() {
		var b = this, a = b.items, d;
		if (a) {
			while ((d = a.first())) {
				b.doRemove(d, true)
			}
		}
		Ext.destroy(b.layout, b.floatingItems);
		b.callParent()
	}
});
Ext.define("Ext.container.Container", {
			extend : "Ext.container.AbstractContainer",
			alias : "widget.container",
			alternateClassName : "Ext.Container",
			getChildByElement : function(d) {
				var f, b, a = 0, c = this.items.items, e = c.length;
				d = Ext.getDom(d);
				for (; a < e; a++) {
					f = c[a];
					b = f.getEl();
					if ((b.dom === d) || b.contains(d)) {
						return f
					}
				}
				return null
			}
		});
Ext.define("Ext.container.Viewport", {
			extend : "Ext.container.Container",
			alias : "widget.viewport",
			requires : ["Ext.EventManager"],
			alternateClassName : "Ext.Viewport",
			isViewport : true,
			ariaRole : "application",
			initComponent : function() {
				var c = this, a = Ext.fly(document.body.parentNode), b;
				c.callParent(arguments);
				a.addCls(Ext.baseCSSPrefix + "viewport");
				if (c.autoScroll) {
					a.setStyle("overflow", "auto")
				}
				c.el = b = Ext.getBody();
				b.setHeight = Ext.emptyFn;
				b.setWidth = Ext.emptyFn;
				b.setSize = Ext.emptyFn;
				b.dom.scroll = "no";
				c.allowDomMove = false;
				Ext.EventManager.onWindowResize(c.fireResize, c);
				c.renderTo = c.el
			},
			fireResize : function(a, b) {
				this.setSize(a, b)
			}
		});
Ext.define("Ext.panel.Header", {
	extend : "Ext.container.Container",
	uses : ["Ext.panel.Tool", "Ext.draw.Component", "Ext.util.CSS"],
	alias : "widget.header",
	isHeader : true,
	defaultType : "tool",
	indicateDrag : false,
	weight : -1,
	renderTpl : ['<div class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl><tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],
	initComponent : function() {
		var c = this, e, b, a, d;
		c.indicateDragCls = c.baseCls + "-draggable";
		c.title = c.title || "&#160;";
		c.tools = c.tools || [];
		c.items = c.items || [];
		c.orientation = c.orientation || "horizontal";
		c.dock = (c.dock) ? c.dock : (c.orientation == "horizontal")
				? "top"
				: "left";
		c.addClsWithUI(c.orientation);
		c.addClsWithUI(c.dock);
		Ext.applyIf(c.renderSelectors, {
					body : "." + c.baseCls + "-body"
				});
		if (!Ext.isEmpty(c.iconCls)) {
			c.initIconCmp();
			c.items.push(c.iconCmp)
		}
		if (c.orientation == "vertical") {
			if (Ext.isIE6 || Ext.isIE7) {
				c.width = this.width || 24
			} else {
				if (Ext.isIEQuirks) {
					c.width = this.width || 25
				}
			}
			c.layout = {
				type : "vbox",
				align : "center",
				clearInnerCtOnLayout : true,
				bindToOwnerCtContainer : false
			};
			c.textConfig = {
				cls : c.baseCls + "-text",
				type : "text",
				text : c.title,
				rotate : {
					degrees : 90
				}
			};
			d = c.ui;
			if (Ext.isArray(d)) {
				d = d[0]
			}
			e = Ext.util.CSS.getRule("." + c.baseCls + "-text-" + d);
			if (e) {
				b = e.style
			}
			if (b) {
				Ext.apply(c.textConfig, {
							"font-family" : b.fontFamily,
							"font-weight" : b.fontWeight,
							"font-size" : b.fontSize,
							fill : b.color
						})
			}
			c.titleCmp = Ext.create("Ext.draw.Component", {
						ariaRole : "heading",
						focusable : false,
						viewBox : false,
						autoSize : true,
						margins : "5 0 0 0",
						items : [c.textConfig],
						renderSelectors : {
							textEl : "." + c.baseCls + "-text"
						}
					})
		} else {
			c.layout = {
				type : "hbox",
				align : "middle",
				clearInnerCtOnLayout : true,
				bindToOwnerCtContainer : false
			};
			c.titleCmp = Ext.create("Ext.Component", {
				xtype : "component",
				ariaRole : "heading",
				focusable : false,
				renderTpl : ['<span class="{cls}-text {cls}-text-{ui}">{title}</span>'],
				renderData : {
					title : c.title,
					cls : c.baseCls,
					ui : c.ui
				},
				renderSelectors : {
					textEl : "." + c.baseCls + "-text"
				}
			})
		}
		c.items.push(c.titleCmp);
		c.items.push({
					xtype : "component",
					html : "&nbsp;",
					flex : 1,
					focusable : false
				});
		c.items = c.items.concat(c.tools);
		this.callParent()
	},
	initIconCmp : function() {
		this.iconCmp = Ext.create("Ext.Component", {
			focusable : false,
			renderTpl : ['<img alt="" src="{blank}" class="{cls}-icon {iconCls}"/>'],
			renderData : {
				blank : Ext.BLANK_IMAGE_URL,
				cls : this.baseCls,
				iconCls : this.iconCls,
				orientation : this.orientation
			},
			renderSelectors : {
				iconEl : "." + this.baseCls + "-icon"
			},
			iconCls : this.iconCls
		})
	},
	afterRender : function() {
		var a = this;
		a.el.unselectable();
		if (a.indicateDrag) {
			a.el.addCls(a.indicateDragCls)
		}
		a.mon(a.el, {
					click : a.onClick,
					scope : a
				});
		a.callParent()
	},
	afterLayout : function() {
		var a = this;
		a.callParent(arguments);
		if (Ext.isIE7) {
			a.el.repaint()
		}
	},
	addUIClsToElement : function(a, c) {
		var b = this;
		b.callParent(arguments);
		if (!c && b.rendered) {
			b.body.addCls(b.baseCls + "-body-" + a);
			b.body.addCls(b.baseCls + "-body-" + b.ui + "-" + a)
		}
	},
	removeUIClsFromElement : function(a, c) {
		var b = this;
		b.callParent(arguments);
		if (!c && b.rendered) {
			b.body.removeCls(b.baseCls + "-body-" + a);
			b.body.removeCls(b.baseCls + "-body-" + b.ui + "-" + a)
		}
	},
	addUIToElement : function(b) {
		var a = this;
		a.callParent(arguments);
		if (!b && a.rendered) {
			a.body.addCls(a.baseCls + "-body-" + a.ui)
		}
		if (!b && a.titleCmp && a.titleCmp.rendered && a.titleCmp.textEl) {
			a.titleCmp.textEl.addCls(a.baseCls + "-text-" + a.ui)
		}
	},
	removeUIFromElement : function() {
		var a = this;
		a.callParent(arguments);
		if (a.rendered) {
			a.body.removeCls(a.baseCls + "-body-" + a.ui)
		}
		if (a.titleCmp && a.titleCmp.rendered && a.titleCmp.textEl) {
			a.titleCmp.textEl.removeCls(a.baseCls + "-text-" + a.ui)
		}
	},
	onClick : function(a) {
		if (!a.getTarget(Ext.baseCSSPrefix + "tool")) {
			this.fireEvent("click", a)
		}
	},
	getTargetEl : function() {
		return this.body || this.frameBody || this.el
	},
	setTitle : function(d) {
		var c = this;
		if (c.rendered) {
			if (c.titleCmp.rendered) {
				if (c.titleCmp.surface) {
					c.title = d || "";
					var b = c.titleCmp.surface.items.items[0], a = c.titleCmp.surface;
					a.remove(b);
					c.textConfig.type = "text";
					c.textConfig.text = d;
					b = a.add(c.textConfig);
					b.setAttributes({
								rotate : {
									degrees : 90
								}
							}, true);
					c.titleCmp.autoSizeSurface()
				} else {
					c.title = d || "&#160;";
					c.titleCmp.textEl.update(c.title)
				}
			} else {
				c.titleCmp.on({
							render : function() {
								c.setTitle(d)
							},
							single : true
						})
			}
		} else {
			c.on({
						render : function() {
							c.layout.layout();
							c.setTitle(d)
						},
						single : true
					})
		}
	},
	setIconCls : function(a) {
		this.iconCls = a;
		if (!this.iconCmp) {
			this.initIconCmp();
			this.insert(0, this.iconCmp)
		} else {
			if (!a || !a.length) {
				this.iconCmp.destroy()
			} else {
				var c = this.iconCmp, b = c.iconEl;
				b.removeCls(c.iconCls);
				b.addCls(a);
				c.iconCls = a
			}
		}
	},
	addTool : function(a) {
		this.tools.push(this.add(a))
	},
	onAdd : function(b, a) {
		this.callParent([arguments]);
		if (b instanceof Ext.panel.Tool) {
			b.bindTo(this.ownerCt);
			this.tools[b.type] = b
		}
	}
});
Ext.define("Ext.grid.header.Container", {
	extend : "Ext.container.Container",
	uses : ["Ext.grid.ColumnLayout", "Ext.grid.column.Column", "Ext.menu.Menu",
			"Ext.menu.CheckItem", "Ext.menu.Separator",
			"Ext.grid.plugin.HeaderResizer", "Ext.grid.plugin.HeaderReorderer"],
	border : true,
	alias : "widget.headercontainer",
	baseCls : Ext.baseCSSPrefix + "grid-header-ct",
	dock : "top",
	weight : 100,
	defaultType : "gridcolumn",
	defaultWidth : 100,
	sortAscText : "Sort Ascending",
	sortDescText : "Sort Descending",
	sortClearText : "Clear Sort",
	columnsText : "Columns",
	lastHeaderCls : Ext.baseCSSPrefix + "column-header-last",
	firstHeaderCls : Ext.baseCSSPrefix + "column-header-first",
	headerOpenCls : Ext.baseCSSPrefix + "column-header-open",
	triStateSort : false,
	ddLock : false,
	dragging : false,
	sortable : true,
	initComponent : function() {
		var a = this;
		a.headerCounter = 0;
		a.plugins = a.plugins || [];
		if (!a.isHeader) {
			a.resizer = Ext.create("Ext.grid.plugin.HeaderResizer");
			a.reorderer = Ext.create("Ext.grid.plugin.HeaderReorderer");
			if (!a.enableColumnResize) {
				a.resizer.disable()
			}
			if (!a.enableColumnMove) {
				a.reorderer.disable()
			}
			a.plugins.push(a.reorderer, a.resizer)
		}
		if (a.isHeader && !a.items) {
			a.layout = "auto"
		} else {
			a.layout = {
				type : "gridcolumn",
				availableSpaceOffset : a.availableSpaceOffset,
				align : "stretchmax",
				resetStretch : true
			}
		}
		a.defaults = a.defaults || {};
		Ext.applyIf(a.defaults, {
					width : a.defaultWidth,
					triStateSort : a.triStateSort,
					sortable : a.sortable
				});
		a.callParent();
		a.addEvents("columnresize", "headerclick", "headertriggerclick",
				"columnmove", "columnhide", "columnshow", "sortchange",
				"menucreate")
	},
	onDestroy : function() {
		Ext.destroy(this.resizer, this.reorderer);
		this.callParent()
	},
	onAdd : function(b) {
		var a = this;
		if (!b.headerId) {
			b.headerId = "h" + (++a.headerCounter)
		}
		a.callParent(arguments);
		a.purgeCache()
	},
	onRemove : function(b) {
		var a = this;
		a.callParent(arguments);
		a.purgeCache()
	},
	afterRender : function() {
		this.callParent();
		var a = this.up("[store]").store, c = a.sorters, d = c.first(), b;
		if (d) {
			b = this.down("gridcolumn[dataIndex=" + d.property + "]");
			if (b) {
				b.setSortState(d.direction, false, true)
			}
		}
	},
	afterLayout : function() {
		if (!this.isHeader) {
			var c = this, b = c.query(">gridcolumn:not([hidden])"), a;
			c.callParent(arguments);
			if (b.length) {
				b[0].el.radioCls(c.firstHeaderCls);
				b[b.length - 1].el.radioCls(c.lastHeaderCls)
			}
		}
	},
	onHeaderShow : function(f) {
		var j = this, k = j.ownerCt, c = j.getMenu(), d, b, g, a, h, e;
		if (c) {
			g = c.down("menucheckitem[headerId=" + f.id + "]");
			if (g) {
				g.setChecked(true, true)
			}
			d = c.query("#columnItem>menucheckitem[checked]");
			b = d.length;
			if ((j.getVisibleGridColumns().length > 1) && j.disabledMenuItems
					&& j.disabledMenuItems.length) {
				if (b == 1) {
					Ext.Array.remove(j.disabledMenuItems, d[0])
				}
				for (e = 0, h = j.disabledMenuItems.length; e < h; e++) {
					a = j.disabledMenuItems[e];
					if (!a.isDestroyed) {
						a[a.menu ? "enableCheckChange" : "enable"]()
					}
				}
				if (b == 1) {
					j.disabledMenuItems = d
				} else {
					j.disabledMenuItems = []
				}
			}
		}
		if (!f.isGroupHeader) {
			if (j.view) {
				j.view.onHeaderShow(j, f, true)
			}
			if (k) {
				k.onHeaderShow(j, f)
			}
		}
		j.fireEvent("columnshow", j, f);
		j.doLayout()
	},
	onHeaderHide : function(f, c) {
		var b = this, a = b.ownerCt, e = b.getMenu(), d;
		if (e) {
			d = e.down("menucheckitem[headerId=" + f.id + "]");
			if (d) {
				d.setChecked(false, true)
			}
			b.setDisabledItems()
		}
		if (!f.isGroupHeader) {
			if (b.view) {
				b.view.onHeaderHide(b, f, true)
			}
			if (a) {
				a.onHeaderHide(b, f)
			}
			if (!c) {
				b.doLayout()
			}
		}
		b.fireEvent("columnhide", b, f)
	},
	setDisabledItems : function() {
		var d = this, f = d.getMenu(), b = 0, a, e, c;
		e = f.query("#columnItem>menucheckitem[checked]");
		if ((e.length === 1)) {
			if (!d.disabledMenuItems) {
				d.disabledMenuItems = []
			}
			if ((d.getVisibleGridColumns().length === 1) && e[0].menu) {
				e = e.concat(e[0].menu.query("menucheckitem[checked]"))
			}
			a = e.length;
			for (b = 0; b < a; b++) {
				c = e[b];
				if (!Ext.Array.contains(d.disabledMenuItems, c)) {
					c[c.menu ? "disableCheckChange" : "disable"]();
					d.disabledMenuItems.push(c)
				}
			}
		}
	},
	tempLock : function() {
		this.ddLock = true;
		Ext.Function.defer(function() {
					this.ddLock = false
				}, 200, this)
	},
	onHeaderResize : function(c, a, b) {
		this.tempLock();
		if (this.view && this.view.rendered) {
			this.view.onHeaderResize(c, a, b)
		}
		this.fireEvent("columnresize", this, c, a)
	},
	onHeaderClick : function(c, b, a) {
		this.fireEvent("headerclick", this, c, b, a)
	},
	onHeaderTriggerClick : function(c, b, a) {
		if (this.fireEvent("headertriggerclick", this, c, b, a) !== false) {
			this.showMenuBy(a, c)
		}
	},
	showMenuBy : function(b, f) {
		var d = this.getMenu(), e = d.down("#ascItem"), c = d.down("#descItem"), a;
		d.activeHeader = d.ownerCt = f;
		d.setFloatParent(f);
		f.titleContainer.addCls(this.headerOpenCls);
		a = f.sortable ? "enable" : "disable";
		if (e) {
			e[a]()
		}
		if (c) {
			c[a]()
		}
		d.showBy(b)
	},
	onMenuDeactivate : function() {
		var a = this.getMenu();
		a.activeHeader.titleContainer.removeCls(this.headerOpenCls)
	},
	moveHeader : function(a, b) {
		this.tempLock();
		this.onHeaderMoved(this.move(a, b), a, b)
	},
	purgeCache : function() {
		var a = this;
		delete a.gridDataColumns;
		if (a.menu) {
			a.menu.destroy();
			delete a.menu
		}
	},
	onHeaderMoved : function(e, b, d) {
		var c = this, a = c.ownerCt;
		if (a) {
			a.onHeaderMove(c, e, b, d)
		}
		c.fireEvent("columnmove", c, e, b, d)
	},
	getMenu : function() {
		var a = this;
		if (!a.menu) {
			a.menu = Ext.create("Ext.menu.Menu", {
						items : a.getMenuItems(),
						listeners : {
							deactivate : a.onMenuDeactivate,
							scope : a
						}
					});
			a.setDisabledItems();
			a.fireEvent("menucreate", a, a.menu)
		}
		return a.menu
	},
	getMenuItems : function() {
		var b = this, a = [{
					itemId : "columnItem",
					text : b.columnsText,
					cls : Ext.baseCSSPrefix + "cols-icon",
					menu : b.getColumnMenu(b)
				}];
		if (b.sortable) {
			a.unshift({
						itemId : "ascItem",
						text : b.sortAscText,
						cls : "xg-hmenu-sort-asc",
						handler : b.onSortAscClick,
						scope : b
					}, {
						itemId : "descItem",
						text : b.sortDescText,
						cls : "xg-hmenu-sort-desc",
						handler : b.onSortDescClick,
						scope : b
					}, "-")
		}
		return a
	},
	onSortAscClick : function() {
		var b = this.getMenu(), a = b.activeHeader;
		a.setSortState("ASC")
	},
	onSortDescClick : function() {
		var b = this.getMenu(), a = b.activeHeader;
		a.setSortState("DESC")
	},
	getColumnMenu : function(f) {
		var c = [], b = 0, e, a = f.query(">gridcolumn[hideable]"), g = a.length, d;
		for (; b < g; b++) {
			e = a[b];
			d = Ext.create("Ext.menu.CheckItem", {
						text : e.text,
						checked : !e.hidden,
						hideOnClick : false,
						headerId : e.id,
						menu : e.isGroupHeader
								? this.getColumnMenu(e)
								: undefined,
						checkHandler : this.onColumnCheckChange,
						scope : this
					});
			if (g === 1) {
				d.disabled = true
			}
			c.push(d);
			e.on({
						destroy : Ext.Function.bind(d.destroy, d)
					})
		}
		return c
	},
	onColumnCheckChange : function(a, b) {
		var c = Ext.getCmp(a.headerId);
		c[b ? "show" : "hide"]()
	},
	getColumnsForTpl : function(d) {
		var b = [], c = this.getGridColumns(d), f = c.length, a = 0, e;
		for (; a < f; a++) {
			e = c[a];
			b.push({
						dataIndex : e.dataIndex,
						align : e.align,
						width : e.hidden ? 0 : e.getDesiredWidth(),
						id : e.id,
						cls : e.tdCls,
						columnId : e.getItemId()
					})
		}
		return b
	},
	getColumnCount : function() {
		return this.getGridColumns().length
	},
	getFullWidth : function(d) {
		var c = 0, b = this.getVisibleGridColumns(d), e = b.length, a = 0;
		for (; a < e; a++) {
			if (!isNaN(b[a].width)) {
				if (b[a].getDesiredWidth) {
					c += b[a].getDesiredWidth()
				} else {
					c += b[a].getWidth()
				}
			}
		}
		return c
	},
	clearOtherSortStates : function(a) {
		var c = this.getGridColumns(), e = c.length, b = 0, d;
		for (; b < e; b++) {
			if (c[b] !== a) {
				d = c[b].sortState;
				c[b].setSortState(null, true)
			}
		}
	},
	getVisibleGridColumns : function(a) {
		return Ext.ComponentQuery.query(":not([hidden])", this
						.getGridColumns(a))
	},
	getGridColumns : function(b) {
		var c = this, a = b ? null : c.gridDataColumns;
		if (!a) {
			c.gridDataColumns = a = [];
			c.cascade(function(d) {
						if ((d !== c) && !d.isGroupHeader) {
							a.push(d)
						}
					})
		}
		return a
	},
	getHeaderIndex : function(b) {
		var a = this.getGridColumns();
		return Ext.Array.indexOf(a, b)
	},
	getHeaderAtIndex : function(a) {
		var b = this.getGridColumns();
		return b[a]
	},
	prepareData : function(h, b, j, l) {
		var f = {}, c = this.getGridColumns(), d = c.length, e = 0, i, n, a, k = this
				.up("tablepanel"), m = k.store;
		for (; e < d; e++) {
			a = {
				tdCls : "",
				style : ""
			};
			i = c[e];
			n = h[i.dataIndex];
			if (Ext.isString(i.renderer)) {
				i.renderer = Ext.util.Format[i.renderer]
			}
			if (Ext.isFunction(i.renderer)) {
				n = i.renderer.call(i.scope || this.ownerCt, n, a, j, b, e, m,
						l)
			}
			f[i.id + "-modified"] = j.isModified(i.dataIndex)
					? Ext.baseCSSPrefix + "grid-dirty-cell"
					: Ext.baseCSSPrefix + "grid-clean-cell";
			f[i.id + "-tdCls"] = a.tdCls;
			f[i.id + "-tdAttr"] = a.tdAttr;
			f[i.id + "-style"] = a.style;
			if (n === undefined || n === null || n === "") {
				n = "&#160;"
			}
			f[i.id] = n
		}
		return f
	},
	expandToFit : function(a) {
		if (this.view) {
			this.view.expandToFit(a)
		}
	}
});
Ext.define("Ext.grid.column.Column", {
	extend : "Ext.grid.header.Container",
	alias : "widget.gridcolumn",
	requires : ["Ext.util.KeyNav"],
	alternateClassName : "Ext.grid.Column",
	baseCls : Ext.baseCSSPrefix + "column-header " + Ext.baseCSSPrefix
			+ "unselectable",
	hoverCls : Ext.baseCSSPrefix + "column-header-over",
	handleWidth : 5,
	sortState : null,
	possibleSortStates : ["ASC", "DESC"],
	renderTpl : '<div class="'
			+ Ext.baseCSSPrefix
			+ 'column-header-inner"><span class="'
			+ Ext.baseCSSPrefix
			+ 'column-header-text">{text}</span><tpl if="!values.menuDisabled"><div class="'
			+ Ext.baseCSSPrefix + 'column-header-trigger"></div></tpl></div>',
	dataIndex : null,
	text : "&#160",
	sortable : true,
	hideable : true,
	menuDisabled : false,
	renderer : false,
	align : "left",
	draggable : true,
	initDraggable : Ext.emptyFn,
	isHeader : true,
	initComponent : function() {
		var c = this, b, a;
		if (Ext.isDefined(c.header)) {
			c.text = c.header;
			delete c.header
		}
		if (c.flex) {
			c.minWidth = c.minWidth
					|| Ext.grid.plugin.HeaderResizer.prototype.minColWidth
		} else {
			c.minWidth = c.width
		}
		if (!c.triStateSort) {
			c.possibleSortStates.length = 2
		}
		if (Ext.isDefined(c.columns)) {
			c.isGroupHeader = true;
			c.items = c.columns;
			delete c.columns;
			delete c.flex;
			c.width = 0;
			for (b = 0, a = c.items.length; b < a; b++) {
				c.width += c.items[b].width
						|| Ext.grid.header.Container.prototype.defaultWidth
			}
			c.minWidth = c.width;
			c.cls = (c.cls || "") + " " + Ext.baseCSSPrefix + "group-header";
			c.sortable = false;
			c.fixed = true;
			c.align = "center"
		}
		Ext.applyIf(c.renderSelectors, {
					titleContainer : "." + Ext.baseCSSPrefix
							+ "column-header-inner",
					triggerEl : "." + Ext.baseCSSPrefix
							+ "column-header-trigger",
					textEl : "." + Ext.baseCSSPrefix + "column-header-text"
				});
		c.callParent(arguments)
	},
	onAdd : function(a) {
		a.isSubHeader = true;
		a.addCls(Ext.baseCSSPrefix + "group-sub-header")
	},
	onRemove : function(a) {
		a.isSubHeader = false;
		a.removeCls(Ext.baseCSSPrefix + "group-sub-header")
	},
	initRenderData : function() {
		var a = this;
		Ext.applyIf(a.renderData, {
					text : a.text,
					menuDisabled : a.menuDisabled
				});
		return a.callParent(arguments)
	},
	setText : function(a) {
		this.text = a;
		if (this.rendered) {
			this.textEl.update(a)
		}
	},
	getOwnerHeaderCt : function() {
		return this.up(":not([isHeader])")
	},
	getIndex : function() {
		return this.isGroupColumn ? false : this.getOwnerHeaderCt()
				.getHeaderIndex(this)
	},
	afterRender : function() {
		var b = this, a = b.el;
		b.callParent(arguments);
		a.addCls(Ext.baseCSSPrefix + "column-header-align-" + b.align)
				.addClsOnOver(b.overCls);
		b.mon(a, {
					click : b.onElClick,
					dblclick : b.onElDblClick,
					scope : b
				});
		if (!Ext.isIE8 || !Ext.isStrict) {
			b.mon(b.getFocusEl(), {
						focus : b.onTitleMouseOver,
						blur : b.onTitleMouseOut,
						scope : b
					})
		}
		b.mon(b.titleContainer, {
					mouseenter : b.onTitleMouseOver,
					mouseleave : b.onTitleMouseOut,
					scope : b
				});
		b.keyNav = Ext.create("Ext.util.KeyNav", a, {
					enter : b.onEnterKey,
					down : b.onDownKey,
					scope : b
				})
	},
	setSize : function(a, k) {
		var h = this, b = h.ownerCt, f = h.getOwnerHeaderCt(), j, g, e, c = h
				.getWidth(), d = 0;
		if (a !== c) {
			if (b.isGroupHeader) {
				j = b.items.items;
				g = j.length;
				if (j[g - 1].rendered) {
					for (e = 0; e < g; e++) {
						d += (j[e] === h) ? a : j[e].getWidth()
					}
					b.minWidth = d;
					b.setWidth(d)
				}
			}
			h.callParent(arguments)
		}
	},
	afterComponentLayout : function(c, a) {
		var d = this, b = this.getOwnerHeaderCt();
		d.callParent(arguments);
		if (c && !d.isGroupHeader && b) {
			b.onHeaderResize(d, c, true)
		}
	},
	setPadding : function() {
		var c = this, a, b = parseInt(c.textEl.getStyle("line-height"), 10);
		if (!c.isGroupHeader) {
			a = c.el.getViewSize().height;
			if (c.titleContainer.getHeight() < a) {
				c.titleContainer.dom.style.height = a + "px"
			}
		}
		a = c.titleContainer.getViewSize().height;
		if (b) {
			c.titleContainer.setStyle({
						paddingTop : Math.max(((a - b) / 2), 0) + "px"
					})
		}
		if (Ext.isIE && c.triggerEl) {
			c.triggerEl.setHeight(a)
		}
	},
	onDestroy : function() {
		var a = this;
		Ext.destroy(a.keyNav);
		delete a.keyNav;
		a.callParent(arguments)
	},
	onTitleMouseOver : function() {
		this.titleContainer.addCls(this.hoverCls)
	},
	onTitleMouseOut : function() {
		this.titleContainer.removeCls(this.hoverCls)
	},
	onDownKey : function(a) {
		if (this.triggerEl) {
			this.onElClick(a, this.triggerEl.dom || this.el.dom)
		}
	},
	onEnterKey : function(a) {
		this.onElClick(a, this.el.dom)
	},
	onElDblClick : function(d, a) {
		var c = this, b = c.ownerCt;
		if (b && Ext.Array.indexOf(b.items, c) !== 0 && c.isOnLeftEdge(d)) {
			b.expandToFit(c.previousSibling("gridcolumn"))
		}
	},
	onElClick : function(d, b) {
		var c = this, a = c.getOwnerHeaderCt();
		if (a && !a.ddLock) {
			if (c.triggerEl
					&& (d.target === c.triggerEl.dom || b === c.triggerEl.dom || d
							.within(c.triggerEl))) {
				a.onHeaderTriggerClick(c, d, b)
			} else {
				if (d.getKey() || (!c.isOnLeftEdge(d) && !c.isOnRightEdge(d))) {
					c.toggleSortState();
					a.onHeaderClick(c, d, b)
				}
			}
		}
	},
	processEvent : function(f, b, a, c, d, g) {
		return this.fireEvent.apply(this, arguments)
	},
	toggleSortState : function() {
		var b = this, a, c;
		if (b.sortable) {
			a = Ext.Array.indexOf(b.possibleSortStates, b.sortState);
			c = (a + 1) % b.possibleSortStates.length;
			b.setSortState(b.possibleSortStates[c])
		}
	},
	doSort : function(b) {
		var a = this.up("tablepanel").store;
		a.sort({
					property : this.getSortParam(),
					direction : b
				})
	},
	getSortParam : function() {
		return this.dataIndex
	},
	setSortState : function(a, j, f) {
		var g = this, h = Ext.baseCSSPrefix + "column-header-sort-", i = h
				+ "ASC", c = h + "DESC", b = h + "null", e = g
				.getOwnerHeaderCt(), d = g.sortState;
		if (d !== a && g.getSortParam()) {
			g.addCls(h + a);
			if (a && !f) {
				g.doSort(a)
			}
			switch (a) {
				case "DESC" :
					g.removeCls([i, b]);
					break;
				case "ASC" :
					g.removeCls([c, b]);
					break;
				case null :
					g.removeCls([i, c]);
					break
			}
			if (e && !g.triStateSort && !j) {
				e.clearOtherSortStates(g)
			}
			g.sortState = a;
			e.fireEvent("sortchange", e, g, a)
		}
	},
	hide : function() {
		var f = this, c, a, d, g, e = 0, b = f.getOwnerHeaderCt();
		f.oldWidth = f.getWidth();
		if (f.isGroupHeader) {
			c = f.items.items;
			f.callParent(arguments);
			b.onHeaderHide(f);
			for (d = 0, a = c.length; d < a; d++) {
				c[d].hidden = true;
				b.onHeaderHide(c[d], true)
			}
			return
		}
		g = f.ownerCt.componentLayout.layoutBusy;
		f.ownerCt.componentLayout.layoutBusy = true;
		f.callParent(arguments);
		f.ownerCt.componentLayout.layoutBusy = g;
		b.onHeaderHide(f);
		if (f.ownerCt.isGroupHeader) {
			c = f.ownerCt.query(">:not([hidden])");
			if (!c.length) {
				f.ownerCt.hide()
			} else {
				for (d = 0, a = c.length; d < a; d++) {
					e += c[d].getWidth()
				}
				f.ownerCt.minWidth = e;
				f.ownerCt.setWidth(e)
			}
		}
	},
	show : function() {
		var f = this, d = f.getOwnerHeaderCt(), g, b, a, c, e = 0;
		g = f.ownerCt.componentLayout.layoutBusy;
		f.ownerCt.componentLayout.layoutBusy = true;
		f.callParent(arguments);
		f.ownerCt.componentLayout.layoutBusy = g;
		if (f.isSubHeader) {
			if (!f.ownerCt.isVisible()) {
				f.ownerCt.show()
			}
		}
		if (f.isGroupHeader && !f.query(":not([hidden])").length) {
			b = f.query(">*");
			for (c = 0, a = b.length; c < a; c++) {
				b[c].show()
			}
		}
		if (f.ownerCt.isGroupHeader) {
			b = f.ownerCt.query(">:not([hidden])");
			for (c = 0, a = b.length; c < a; c++) {
				e += b[c].getWidth()
			}
			f.ownerCt.minWidth = e;
			f.ownerCt.setWidth(e)
		}
		if (d) {
			d.onHeaderShow(f)
		}
	},
	getDesiredWidth : function() {
		var a = this;
		if (a.rendered && a.componentLayout
				&& a.componentLayout.lastComponentSize) {
			return a.componentLayout.lastComponentSize.width
		} else {
			if (a.flex) {
				return a.width
			} else {
				return a.width
			}
		}
	},
	getCellSelector : function() {
		return "." + Ext.baseCSSPrefix + "grid-cell-" + this.getItemId()
	},
	getCellInnerSelector : function() {
		return this.getCellSelector() + " ." + Ext.baseCSSPrefix
				+ "grid-cell-inner"
	},
	isOnLeftEdge : function(a) {
		return (a.getXY()[0] - this.el.getLeft() <= this.handleWidth)
	},
	isOnRightEdge : function(a) {
		return (this.el.getRight() - a.getXY()[0] <= this.handleWidth)
	}
});
Ext.define("Ext.grid.RowNumberer", {
			extend : "Ext.grid.column.Column",
			alias : "widget.rownumberer",
			text : "&#160",
			width : 23,
			sortable : false,
			align : "right",
			constructor : function(a) {
				this.callParent(arguments);
				if (this.rowspan) {
					this.renderer = Ext.Function.bind(this.renderer, this)
				}
			},
			fixed : true,
			hideable : false,
			menuDisabled : true,
			dataIndex : "",
			cls : Ext.baseCSSPrefix + "row-numberer",
			rowspan : undefined,
			renderer : function(e, b, a, d, f, c) {
				if (this.rowspan) {
					b.cellAttr = 'rowspan="' + this.rowspan + '"'
				}
				b.tdCls = Ext.baseCSSPrefix + "grid-cell-special";
				return c.indexOfTotal(a) + 1
			}
		});
Ext.define("Ext.tree.Column", {
	extend : "Ext.grid.column.Column",
	alias : "widget.treecolumn",
	initComponent : function() {
		var a = this.renderer || this.defaultRenderer, b = this.scope || window;
		this.renderer = function(k, m, d, c, j, f, i) {
			var q = [], o = Ext.String.format, s = d.getDepth(), p = Ext.baseCSSPrefix
					+ "tree-", e = p + "elbow-", l = p + "expander", h = '<img src="{1}" class="{0}" />', t = '<input type="button" role="checkbox" class="{0}" {1} />', g = a
					.apply(b, arguments), n = d.get("href"), r = d
					.get("hrefTarget");
			while (d) {
				if (!d.isRoot() || (d.isRoot() && i.rootVisible)) {
					if (d.getDepth() === s) {
						q.unshift(o(h, p
										+ "icon "
										+ p
										+ "icon"
										+ (d.get("icon") ? "-inline " : (d
												.isLeaf()
												? "-leaf "
												: "-parent "))
										+ (d.get("iconCls") || ""), d
										.get("icon")
										|| Ext.BLANK_IMAGE_URL));
						if (d.get("checked") !== null) {
							q.unshift(o(t, (p + "checkbox")
											+ (d.get("checked") ? " " + p
													+ "checkbox-checked" : ""),
									d.get("checked")
											? 'aria-checked="true"'
											: ""));
							if (d.get("checked")) {
								m.tdCls += (" " + Ext.baseCSSPrefix + "tree-checked")
							}
						}
						if (d.isLast()) {
							if (d.isLeaf()
									|| (d.isLoaded() && !d.hasChildNodes())) {
								q
										.unshift(o(h, (e + "end"),
												Ext.BLANK_IMAGE_URL))
							} else {
								q.unshift(o(h, (e + "end-plus " + l),
										Ext.BLANK_IMAGE_URL))
							}
						} else {
							if (d.isLeaf()
									|| (d.isLoaded() && !d.hasChildNodes())) {
								q.unshift(o(h, (p + "elbow"),
										Ext.BLANK_IMAGE_URL))
							} else {
								q.unshift(o(h, (e + "plus " + l),
										Ext.BLANK_IMAGE_URL))
							}
						}
					} else {
						if (d.isLast() || d.getDepth() === 0) {
							q.unshift(o(h, (e + "empty"), Ext.BLANK_IMAGE_URL))
						} else {
							if (d.getDepth() !== 0) {
								q.unshift(o(h, (e + "line"),
										Ext.BLANK_IMAGE_URL))
							}
						}
					}
				}
				d = d.parentNode
			}
			if (n) {
				g = o('<a href="{0}" target="{1}">{2}</a>', n, r, g)
			}
			return q.join("") + g
		};
		this.callParent(arguments)
	},
	defaultRenderer : function(a) {
		return a
	}
});
Ext.define("Ext.tab.Tab", {
			extend : "Ext.button.Button",
			alias : "widget.tab",
			requires : ["Ext.layout.component.Tab", "Ext.util.KeyNav"],
			componentLayout : "tab",
			isTab : true,
			baseCls : Ext.baseCSSPrefix + "tab",
			activeCls : "active",
			closableCls : "closable",
			closable : true,
			closeText : "Close Tab",
			active : false,
			scale : false,
			position : "top",
			initComponent : function() {
				var a = this;
				a.addEvents("activate", "deactivate", "beforeclose", "close");
				a.callParent(arguments);
				if (a.card) {
					a.setCard(a.card)
				}
			},
			onRender : function() {
				var a = this;
				a.addClsWithUI(a.position);
				a.syncClosableUI();
				a.callParent(arguments);
				if (a.active) {
					a.activate(true)
				}
				a.syncClosableElements();
				a.keyNav = Ext.create("Ext.util.KeyNav", a.el, {
							enter : a.onEnterKey,
							del : a.onDeleteKey,
							scope : a
						})
			},
			enable : function(a) {
				var b = this;
				b.callParent(arguments);
				b.removeClsWithUI(b.position + "-disabled");
				return b
			},
			disable : function(a) {
				var b = this;
				b.callParent(arguments);
				b.addClsWithUI(b.position + "-disabled");
				return b
			},
			onDestroy : function() {
				var a = this;
				if (a.closeEl) {
					a.closeEl.un("click", Ext.EventManager.preventDefault);
					a.closeEl = null
				}
				Ext.destroy(a.keyNav);
				delete a.keyNav;
				a.callParent(arguments)
			},
			setClosable : function(a) {
				var b = this;
				a = (!arguments.length || !!a);
				if (b.closable != a) {
					b.closable = a;
					if (b.card) {
						b.card.closable = a
					}
					b.syncClosableUI();
					if (b.rendered) {
						b.syncClosableElements();
						b.doComponentLayout();
						if (b.ownerCt) {
							b.ownerCt.doLayout()
						}
					}
				}
			},
			syncClosableElements : function() {
				var a = this;
				if (a.closable) {
					if (!a.closeEl) {
						a.closeEl = a.el.createChild({
									tag : "a",
									cls : a.baseCls + "-close-btn",
									href : "#",
									html : a.closeText,
									title : a.closeText
								}).on("click", Ext.EventManager.preventDefault)
					}
				} else {
					var b = a.closeEl;
					if (b) {
						b.un("click", Ext.EventManager.preventDefault);
						b.remove();
						a.closeEl = null
					}
				}
			},
			syncClosableUI : function() {
				var b = this, a = [b.closableCls,
						b.closableCls + "-" + b.position];
				if (b.closable) {
					b.addClsWithUI(a)
				} else {
					b.removeClsWithUI(a)
				}
			},
			setCard : function(a) {
				var b = this;
				b.card = a;
				b.setText(b.title || a.title);
				b.setIconCls(b.iconCls || a.iconCls)
			},
			onCloseClick : function() {
				var a = this;
				if (a.fireEvent("beforeclose", a) !== false) {
					if (a.tabBar) {
						a.tabBar.closeTab(a)
					}
					a.fireEvent("close", a)
				}
			},
			onEnterKey : function(b) {
				var a = this;
				if (a.tabBar) {
					a.tabBar.onClick(b, a.el)
				}
			},
			onDeleteKey : function(b) {
				var a = this;
				if (a.closable) {
					a.onCloseClick()
				}
			},
			activate : function(b) {
				var a = this;
				a.active = true;
				a.addClsWithUI([a.activeCls, a.position + "-" + a.activeCls]);
				if (b !== true) {
					a.fireEvent("activate", a)
				}
			},
			deactivate : function(b) {
				var a = this;
				a.active = false;
				a
						.removeClsWithUI([a.activeCls,
								a.position + "-" + a.activeCls]);
				if (b !== true) {
					a.fireEvent("deactivate", a)
				}
			}
		});
Ext.define("Ext.tab.Bar", {
	extend : "Ext.panel.Header",
	alias : "widget.tabbar",
	baseCls : Ext.baseCSSPrefix + "tab-bar",
	requires : ["Ext.tab.Tab", "Ext.FocusManager"],
	defaultType : "tab",
	plain : false,
	renderTpl : [
			'<div class="{baseCls}-body<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>',
			'<div class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],
	minTabWidth : 30,
	maxTabWidth : undefined,
	initComponent : function() {
		var b = this, a;
		if (b.plain) {
			b.setUI(b.ui + "-plain")
		}
		b.addClsWithUI(b.dock);
		b.addEvents("change");
		Ext.applyIf(this.renderSelectors, {
					body : "." + this.baseCls + "-body",
					strip : "." + this.baseCls + "-strip"
				});
		b.callParent(arguments);
		b.layout.align = (b.orientation == "vertical") ? "left" : "top";
		b.layout.overflowHandler = Ext.create(
				"Ext.layout.container.boxOverflow.Scroller", b.layout);
		b.items.removeAt(b.items.getCount() - 1);
		b.items.removeAt(b.items.getCount() - 1);
		a = b.orientation == "vertical" ? ["up", "down"] : ["left", "right"];
		Ext.FocusManager.subscribe(b, {
					keys : a
				})
	},
	onAdd : function(a) {
		var b = this, d = b.tabPanel, c = !!d;
		b.callParent(arguments);
		a.position = b.dock;
		if (c) {
			a.minWidth = d.minTabWidth
		} else {
			a.minWidth = b.minTabWidth + (a.iconCls ? 25 : 0)
		}
		a.maxWidth = b.maxTabWidth || (c ? d.maxTabWidth : undefined)
	},
	afterRender : function() {
		var a = this;
		a.mon(a.el, {
					scope : a,
					click : a.onClick,
					delegate : "." + Ext.baseCSSPrefix + "tab"
				});
		a.callParent(arguments)
	},
	afterComponentLayout : function() {
		var a = this;
		a.callParent(arguments);
		a.strip.setWidth(a.el.getWidth())
	},
	onClick : function(c, b) {
		var a = Ext.getCmp(b.id), d = this.tabPanel;
		b = c.getTarget();
		if (a && a.isDisabled && !a.isDisabled()) {
			if (a.closable && b === a.closeEl.dom) {
				a.onCloseClick()
			} else {
				this.setActiveTab(a);
				if (d) {
					d.setActiveTab(a.card)
				}
				a.focus()
			}
		}
	},
	closeTab : function(c) {
		var b = c.card, d = this.tabPanel, a;
		if (c.active && this.items.getCount() > 1) {
			a = c.next("tab") || this.items.items[0];
			this.setActiveTab(a);
			if (d) {
				d.setActiveTab(a.card)
			}
		}
		this.remove(c);
		if (d && b) {
			d.remove(b)
		}
		if (a) {
			a.focus()
		}
	},
	setActiveTab : function(a) {
		if (a.disabled) {
			return
		}
		var b = this;
		if (b.activeTab) {
			b.activeTab.deactivate()
		}
		a.activate();
		if (b.rendered) {
			b.layout.layout();
			a.el.scrollIntoView(b.layout.getRenderTarget())
		}
		b.activeTab = a;
		b.fireEvent("change", b, a, a.card)
	}
});
Ext.define("Ext.toolbar.Separator", {
			extend : "Ext.toolbar.Item",
			alias : "widget.tbseparator",
			alternateClassName : "Ext.Toolbar.Separator",
			baseCls : Ext.baseCSSPrefix + "toolbar-separator",
			focusable : false
		});
Ext.define("Ext.layout.container.boxOverflow.Menu", {
	extend : "Ext.layout.container.boxOverflow.None",
	requires : ["Ext.toolbar.Separator", "Ext.button.Button"],
	alternateClassName : "Ext.layout.boxOverflow.Menu",
	noItemsMenuText : '<div class="' + Ext.baseCSSPrefix
			+ 'toolbar-no-items">(None)</div>',
	constructor : function(b) {
		var a = this;
		a.callParent(arguments);
		b.beforeLayout = Ext.Function.createInterceptor(b.beforeLayout,
				this.clearOverflow, this);
		a.afterCtCls = a.afterCtCls || Ext.baseCSSPrefix + "box-menu-"
				+ b.parallelAfter;
		a.menuItems = []
	},
	handleOverflow : function(a, g) {
		var f = this, e = f.layout, c = "get" + e.parallelPrefixCap, b = {}, d = [
				null, null];
		f.callParent(arguments);
		this.createMenu(a, g);
		b[e.perpendicularPrefix] = g[e.perpendicularPrefix];
		b[e.parallelPrefix] = g[e.parallelPrefix] - f.afterCt[c]();
		d[e.perpendicularSizeIndex] = (a.meta.maxSize - f.menuTrigger["get"
				+ e.perpendicularPrefixCap]())
				/ 2;
		f.menuTrigger.setPosition.apply(f.menuTrigger, d);
		return {
			targetSize : b
		}
	},
	clearOverflow : function(a, h) {
		var g = this, f = h
				? h.width + (g.afterCt ? g.afterCt.getWidth() : 0)
				: 0, b = g.menuItems, c = 0, e = b.length, d;
		g.hideTrigger();
		for (; c < e; c++) {
			b[c].show()
		}
		b.length = 0;
		return h ? {
			targetSize : {
				height : h.height,
				width : f
			}
		} : null
	},
	showTrigger : function() {
		this.menuTrigger.show()
	},
	hideTrigger : function() {
		if (this.menuTrigger != undefined) {
			this.menuTrigger.hide()
		}
	},
	beforeMenuShow : function(h) {
		var g = this, b = g.menuItems, d = 0, a = b.length, f, e;
		var c = function(j, i) {
			return j.isXType("buttongroup")
					&& !(i instanceof Ext.toolbar.Separator)
		};
		g.clearMenu();
		h.removeAll();
		for (; d < a; d++) {
			f = b[d];
			if (!d && (f instanceof Ext.toolbar.Separator)) {
				continue
			}
			if (e && (c(f, e) || c(e, f))) {
				h.add("-")
			}
			g.addComponentToMenu(h, f);
			e = f
		}
		if (h.items.length < 1) {
			h.add(g.noItemsMenuText)
		}
	},
	createMenuConfig : function(c, a) {
		var b = Ext.apply({}, c.initialConfig), d = c.toggleGroup;
		Ext.copyTo(b, c, ["iconCls", "icon", "itemId", "disabled", "handler",
						"scope", "menu"]);
		Ext.apply(b, {
					text : c.overflowText || c.text,
					hideOnClick : a,
					destroyMenu : false
				});
		if (d || c.enableToggle) {
			Ext.apply(b, {
						group : d,
						checked : c.pressed,
						listeners : {
							checkchange : function(f, e) {
								c.toggle(e)
							}
						}
					})
		}
		delete b.ownerCt;
		delete b.xtype;
		delete b.id;
		return b
	},
	addComponentToMenu : function(c, a) {
		var b = this;
		if (a instanceof Ext.toolbar.Separator) {
			c.add("-")
		} else {
			if (a.isComponent) {
				if (a.isXType("splitbutton")) {
					c.add(b.createMenuConfig(a, true))
				} else {
					if (a.isXType("button")) {
						c.add(b.createMenuConfig(a, !a.menu))
					} else {
						if (a.isXType("buttongroup")) {
							a.items.each(function(d) {
										b.addComponentToMenu(c, d)
									})
						} else {
							c.add(Ext.create(Ext.getClassName(a), b
											.createMenuConfig(a)))
						}
					}
				}
			}
		}
	},
	clearMenu : function() {
		var a = this.moreMenu;
		if (a && a.items) {
			a.items.each(function(b) {
						if (b.menu) {
							delete b.menu
						}
					})
		}
	},
	createMenu : function(a, c) {
		var k = this, h = k.layout, l = h.parallelBefore, e = h.parallelPrefix, b = c[e], g = a.boxes, d = 0, j = g.length, f;
		if (!k.menuTrigger) {
			k.createInnerElements();
			k.menu = Ext.create("Ext.menu.Menu", {
						hideMode : "offsets",
						listeners : {
							scope : k,
							beforeshow : k.beforeMenuShow
						}
					});
			k.menuTrigger = Ext.create("Ext.button.Button", {
				ownerCt : k.layout.owner,
				iconCls : Ext.baseCSSPrefix + h.owner.getXType() + "-more-icon",
				ui : h.owner instanceof Ext.toolbar.Toolbar
						? "default-toolbar"
						: "default",
				menu : k.menu,
				getSplitCls : function() {
					return ""
				},
				renderTo : k.afterCt
			})
		}
		k.showTrigger();
		b -= k.afterCt.getWidth();
		k.menuItems.length = 0;
		for (; d < j; d++) {
			f = g[d];
			if (f[l] + f[e] > b) {
				k.menuItems.push(f.component);
				f.component.hide()
			}
		}
	},
	createInnerElements : function() {
		var a = this, b = a.layout.getRenderTarget();
		if (!this.afterCt) {
			b.addCls(Ext.baseCSSPrefix + a.layout.direction
					+ "-box-overflow-body");
			this.afterCt = b.insertSibling({
						cls : Ext.layout.container.Box.prototype.innerCls + " "
								+ this.afterCtCls
					}, "before")
		}
	},
	destroy : function() {
		Ext.destroy(this.menu, this.menuTrigger)
	}
});
Ext.define("Ext.layout.container.Box", {
	alias : ["layout.box"],
	extend : "Ext.layout.container.Container",
	alternateClassName : "Ext.layout.BoxLayout",
	requires : ["Ext.layout.container.boxOverflow.None",
			"Ext.layout.container.boxOverflow.Menu",
			"Ext.layout.container.boxOverflow.Scroller", "Ext.util.Format",
			"Ext.dd.DragDropManager"],
	defaultMargins : {
		top : 0,
		right : 0,
		bottom : 0,
		left : 0
	},
	padding : "0",
	pack : "start",
	type : "box",
	scrollOffset : 0,
	itemCls : Ext.baseCSSPrefix + "box-item",
	targetCls : Ext.baseCSSPrefix + "box-layout-ct",
	innerCls : Ext.baseCSSPrefix + "box-inner",
	bindToOwnerCtContainer : true,
	fixedLayout : false,
	availableSpaceOffset : 0,
	reserveOffset : true,
	clearInnerCtOnLayout : false,
	flexSortFn : function(d, c) {
		var e = "max" + this.parallelPrefixCap, f = Infinity;
		d = d.component[e] || f;
		c = c.component[e] || f;
		if (!isFinite(d) && !isFinite(c)) {
			return false
		}
		return d - c
	},
	minSizeSortFn : function(d, c) {
		return c.available - d.available
	},
	constructor : function(a) {
		var b = this;
		b.callParent(arguments);
		b.flexSortFn = Ext.Function.bind(b.flexSortFn, b);
		b.initOverflowHandler()
	},
	getChildBox : function(a) {
		a = a.el || this.owner.getComponent(a).el;
		return {
			left : a.getLeft(true),
			top : a.getTop(true),
			width : a.getWidth(),
			height : a.getHeight()
		}
	},
	calculateChildBox : function(e) {
		var d = this, b = d.calculateChildBoxes(d.getVisibleItems(), d
						.getLayoutTargetSize()).boxes, c = b.length, a = 0;
		e = d.owner.getComponent(e);
		for (; a < c; a++) {
			if (b[a].component === e) {
				return b[a]
			}
		}
	},
	calculateChildBoxes : function(p, b) {
		var x = this, J = Math, l = J.max, o = Infinity, v, s = x.parallelPrefix, n = x.parallelPrefixCap, M = x.perpendicularPrefix, t = x.perpendicularPrefixCap, C = "min"
				+ n, F = "min" + t, aj = "max" + t, c = b[s] - x.scrollOffset, Z = b[M], ae = x.padding, r = ae[x.parallelBefore], u = r
				+ ae[x.parallelAfter], P = ae[x.perpendicularLeftTop], K = P
				+ ae[x.perpendicularRightBottom], ah = l(0, Z - K), ab = x.pack == "start", am = x.pack == "center", E = x.pack == "end", ad = Ext.Number.constrain, N = p.length, d = 0, ai = 0, ak = 0, w = 0, G = 0, Q = [], L = [], ag, af, h, aa, A, B, al, Y, W, X, m, e, z, I, y, O, j, R, ac, f, D, T, a, q, k, H, S, V, g, U;
		for (af = 0; af < N; af++) {
			h = p[af];
			A = h[M];
			x.layoutItem(h);
			B = h.margins;
			H = B[x.parallelBefore] + B[x.parallelAfter];
			W = {
				component : h,
				margins : B
			};
			if (h.flex) {
				ai += h.flex;
				aa = v
			} else {
				if (!(h[s] && A)) {
					al = h.getSize()
				}
				aa = h[s] || al[s];
				A = A || al[M]
			}
			d += H + (aa || 0);
			ak += H + (h.flex ? h[C] || 0 : aa);
			w += H + (h[C] || aa || 0);
			if (typeof A != "number") {
				A = h["get" + t]()
			}
			G = l(G, A + B[x.perpendicularLeftTop]
							+ B[x.perpendicularRightBottom]);
			W[s] = aa || v;
			W[M] = A || v;
			Q.push(W)
		}
		X = ak - c;
		m = w > c;
		e = l(0, c - d - u - (x.reserveOffset ? x.availableSpaceOffset : 0));
		if (m) {
			for (af = 0; af < N; af++) {
				j = Q[af];
				z = p[af][C] || p[af][s] || j[s];
				j.dirtySize = j.dirtySize || j[s] != z;
				j[s] = z
			}
		} else {
			if (X > 0) {
				for (af = 0; af < N; af++) {
					I = p[af];
					z = I[C] || 0;
					if (I.flex) {
						j = Q[af];
						j.dirtySize = j.dirtySize || j[s] != z;
						j[s] = z
					} else {
						L.push({
									minSize : z,
									available : Q[af][s] - z,
									index : af
								})
					}
				}
				Ext.Array.sort(L, x.minSizeSortFn);
				for (af = 0, y = L.length; af < y; af++) {
					O = L[af].index;
					if (O == v) {
						continue
					}
					I = p[O];
					z = L[af].minSize;
					j = Q[O];
					R = j[s];
					ac = l(z, R - J.ceil(X / (y - af)));
					f = R - ac;
					j.dirtySize = j.dirtySize || j[s] != ac;
					j[s] = ac;
					X -= f
				}
			} else {
				a = e;
				q = ai;
				T = [];
				for (af = 0; af < N; af++) {
					h = p[af];
					if (ab && h.flex) {
						T.push(Q[Ext.Array.indexOf(p, h)])
					}
				}
				Ext.Array.sort(T, x.flexSortFn);
				for (af = 0; af < T.length; af++) {
					S = T[af];
					h = S.component;
					B = S.margins;
					k = J.ceil((h.flex / q) * a);
					k = Math
							.max(h["min" + n] || 0, J.min(h["max" + n] || o, k));
					a -= k;
					q -= h.flex;
					S.dirtySize = S.dirtySize || S[s] != k;
					S[s] = k
				}
			}
		}
		if (am) {
			r += e / 2
		} else {
			if (E) {
				r += e
			}
		}
		if (x.owner.dock && (Ext.isIE6 || Ext.isIE7 || Ext.isIEQuirks)
				&& !x.owner.width && x.direction == "vertical") {
			ag = G + x.owner.el.getPadding("lr")
					+ x.owner.el.getBorderWidth("lr");
			if (x.owner.frameSize) {
				ag += x.owner.frameSize.left + x.owner.frameSize.right
			}
			ah = Math.min(ah, b.width = G + ae.left + ae.right)
		}
		for (af = 0; af < N; af++) {
			h = p[af];
			S = Q[af];
			B = S.margins;
			g = B[x.perpendicularLeftTop] + B[x.perpendicularRightBottom];
			r += B[x.parallelBefore];
			S[x.parallelBefore] = r;
			S[x.perpendicularLeftTop] = P + B[x.perpendicularLeftTop];
			if (x.align == "stretch") {
				U = ad(ah - g, h[F] || 0, h[aj] || o);
				S.dirtySize = S.dirtySize || S[M] != U;
				S[M] = U
			} else {
				if (x.align == "stretchmax") {
					U = ad(G - g, h[F] || 0, h[aj] || o);
					S.dirtySize = S.dirtySize || S[M] != U;
					S[M] = U
				} else {
					if (x.align == x.alignCenteringString) {
						D = l(ah, G)
								- x.innerCt.getBorderWidth(x.perpendicularLT
										+ x.perpendicularRB) - S[M];
						if (D > 0) {
							S[x.perpendicularLeftTop] = P + Math.round(D / 2)
						}
					}
				}
			}
			r += (S[s] || 0) + B[x.parallelAfter]
		}
		return {
			boxes : Q,
			meta : {
				calculatedWidth : ag,
				maxSize : G,
				nonFlexSize : d,
				desiredSize : ak,
				minimumSize : w,
				shortfall : X,
				tooNarrow : m
			}
		}
	},
	initOverflowHandler : function() {
		var c = this.overflowHandler;
		if (typeof c == "string") {
			c = {
				type : c
			}
		}
		var b = "None";
		if (c && c.type != undefined) {
			b = c.type
		}
		var a = Ext.layout.container.boxOverflow[b];
		if (a[this.type]) {
			a = a[this.type]
		}
		this.overflowHandler = Ext.create("Ext.layout.container.boxOverflow."
						+ b, this, c)
	},
	onLayout : function() {
		this.callParent();
		if (this.clearInnerCtOnLayout === true && this.adjustmentPass !== true) {
			this.innerCt.setSize(null, null)
		}
		var g = this, c = g.getLayoutTargetSize(), f = g.getVisibleItems(), b = g
				.calculateChildBoxes(f, c), e = b.boxes, h = b.meta, i, a, d;
		if (g.autoSize && b.meta.desiredSize) {
			c[g.parallelPrefix] = b.meta.desiredSize
		}
		if (h.shortfall > 0) {
			i = g.overflowHandler;
			a = h.tooNarrow ? "handleOverflow" : "clearOverflow";
			d = i[a](b, c);
			if (d) {
				if (d.targetSize) {
					c = d.targetSize
				}
				if (d.recalculate) {
					f = g.getVisibleItems(owner);
					b = g.calculateChildBoxes(f, c);
					e = b.boxes
				}
			}
		} else {
			g.overflowHandler.clearOverflow()
		}
		g.layoutTargetLastSize = c;
		g.childBoxCache = b;
		g.updateInnerCtSize(c, b);
		g.updateChildBoxes(e);
		g.handleTargetOverflow(c)
	},
	updateChildBoxes : function(g) {
		var l = this, e = 0, c = g.length, o = [], n = Ext.dd.DDM
				.getDDById(l.innerCt.id), a, f, d, h, j, b;
		for (; e < c; e++) {
			f = g[e];
			h = f.component;
			if (n && (n.getDragEl() === h.el.dom)) {
				continue
			}
			d = false;
			a = l.getChildBox(h);
			if (l.animate) {
				b = l.animate.callback || l.animate;
				j = {
					layoutAnimation : true,
					target : h,
					from : {},
					to : {},
					listeners : {}
				};
				if (!isNaN(f.width) && (f.width != a.width)) {
					d = true;
					j.to.width = f.width
				}
				if (!isNaN(f.height) && (f.height != a.height)) {
					d = true;
					j.to.height = f.height
				}
				if (!isNaN(f.left) && (f.left != a.left)) {
					d = true;
					j.to.left = f.left
				}
				if (!isNaN(f.top) && (f.top != a.top)) {
					d = true;
					j.to.top = f.top
				}
				if (d) {
					o.push(j)
				}
			} else {
				if (f.dirtySize) {
					if (f.width !== a.width || f.height !== a.height) {
						l.setItemSize(h, f.width, f.height)
					}
				}
				if (isNaN(f.left) || isNaN(f.top)) {
					continue
				}
				h.setPosition(f.left, f.top)
			}
		}
		c = o.length;
		if (c) {
			var m = function(i) {
				c -= 1;
				if (!c) {
					l.layoutBusy = false;
					if (Ext.isFunction(b)) {
						b()
					}
				}
			};
			var k = function() {
				l.layoutBusy = true
			};
			for (e = 0, c = o.length; e < c; e++) {
				j = o[e];
				j.listeners.afteranimate = m;
				if (!e) {
					j.listeners.beforeanimate = k
				}
				if (l.animate.duration) {
					j.duration = l.animate.duration
				}
				h = j.target;
				delete j.target;
				h.stopAnimation();
				h.animate(j)
			}
		}
	},
	updateInnerCtSize : function(c, a) {
		var g = this, e = Math.max, f = g.align, h = g.padding, b = c.width, j = c.height, k = a.meta, d, i;
		if (g.direction == "horizontal") {
			d = b;
			i = k.maxSize + h.top + h.bottom + g.innerCt.getBorderWidth("tb");
			if (f == "stretch") {
				i = j
			} else {
				if (f == "middle") {
					i = e(j, i)
				}
			}
		} else {
			i = j;
			d = k.maxSize + h.left + h.right + g.innerCt.getBorderWidth("lr");
			if (f == "stretch") {
				d = b
			} else {
				if (f == "center") {
					d = e(b, d)
				}
			}
		}
		g.getRenderTarget().setSize(d || undefined, i || undefined);
		if (k.calculatedWidth && g.owner.el.getWidth() > k.calculatedWidth) {
			g.owner.el.setWidth(k.calculatedWidth)
		}
		if (g.innerCt.dom.scrollTop) {
			g.innerCt.dom.scrollTop = 0
		}
	},
	handleTargetOverflow : function(c) {
		var b = this.getTarget(), d = b.getStyle("overflow"), a;
		if (d && d != "hidden" && !this.adjustmentPass) {
			a = this.getLayoutTargetSize();
			if (a.width != c.width || a.height != c.height) {
				this.adjustmentPass = true;
				this.onLayout();
				return true
			}
		}
		delete this.adjustmentPass
	},
	isValidParent : function(c, d, a) {
		var b = c.el ? c.el.dom : Ext.getDom(c);
		return (b && this.innerCt && b.parentNode === this.innerCt.dom) || false
	},
	getRenderTarget : function() {
		if (!this.innerCt) {
			this.innerCt = this.getTarget().createChild({
						cls : this.innerCls,
						role : "presentation"
					});
			this.padding = Ext.util.Format.parseBox(this.padding)
		}
		return this.innerCt
	},
	renderItem : function(d, f) {
		this.callParent(arguments);
		var c = this, a = d.getEl(), b = a.dom.style, e = d.margins || d.margin;
		if (e) {
			if (Ext.isString(e) || Ext.isNumber(e)) {
				e = Ext.util.Format.parseBox(e)
			} else {
				Ext.applyIf(e, {
							top : 0,
							right : 0,
							bottom : 0,
							left : 0
						})
			}
		} else {
			e = Ext.apply({}, c.defaultMargins)
		}
		e.top += a.getMargin("t");
		e.right += a.getMargin("r");
		e.bottom += a.getMargin("b");
		e.left += a.getMargin("l");
		b.marginTop = b.marginRight = b.marginBottom = b.marginLeft = "0";
		d.margins = e
	},
	destroy : function() {
		Ext.destroy(this.overflowHandler);
		this.callParent(arguments)
	}
});
Ext.define("Ext.layout.container.HBox", {
			alias : ["layout.hbox"],
			extend : "Ext.layout.container.Box",
			alternateClassName : "Ext.layout.HBoxLayout",
			align : "top",
			alignCenteringString : "middle",
			type : "hbox",
			direction : "horizontal",
			parallelSizeIndex : 0,
			perpendicularSizeIndex : 1,
			parallelPrefix : "width",
			parallelPrefixCap : "Width",
			parallelLT : "l",
			parallelRB : "r",
			parallelBefore : "left",
			parallelBeforeCap : "Left",
			parallelAfter : "right",
			parallelPosition : "x",
			perpendicularPrefix : "height",
			perpendicularPrefixCap : "Height",
			perpendicularLT : "t",
			perpendicularRB : "b",
			perpendicularLeftTop : "top",
			perpendicularRightBottom : "bottom",
			perpendicularPosition : "y"
		});
Ext.define("Ext.layout.container.VBox", {
			alias : ["layout.vbox"],
			extend : "Ext.layout.container.Box",
			alternateClassName : "Ext.layout.VBoxLayout",
			align : "left",
			alignCenteringString : "center",
			type : "vbox",
			direction : "vertical",
			parallelSizeIndex : 1,
			perpendicularSizeIndex : 0,
			parallelPrefix : "height",
			parallelPrefixCap : "Height",
			parallelLT : "t",
			parallelRB : "b",
			parallelBefore : "top",
			parallelBeforeCap : "Top",
			parallelAfter : "bottom",
			parallelPosition : "y",
			perpendicularPrefix : "width",
			perpendicularPrefixCap : "Width",
			perpendicularLT : "l",
			perpendicularRB : "r",
			perpendicularLeftTop : "left",
			perpendicularRightBottom : "right",
			perpendicularPosition : "x"
		});
Ext.define("Ext.toolbar.Toolbar", {
			extend : "Ext.container.Container",
			requires : ["Ext.toolbar.Fill", "Ext.layout.container.HBox",
					"Ext.layout.container.VBox", "Ext.FocusManager"],
			uses : ["Ext.toolbar.Separator"],
			alias : "widget.toolbar",
			alternateClassName : "Ext.Toolbar",
			isToolbar : true,
			baseCls : Ext.baseCSSPrefix + "toolbar",
			ariaRole : "toolbar",
			defaultType : "button",
			vertical : false,
			enableOverflow : false,
			trackMenus : true,
			itemCls : Ext.baseCSSPrefix + "toolbar-item",
			initComponent : function() {
				var b = this, a;
				if (!b.layout && b.enableOverflow) {
					b.layout = {
						overflowHandler : "Menu"
					}
				}
				if (b.dock === "right" || b.dock === "left") {
					b.vertical = true
				}
				b.layout = Ext.applyIf(Ext.isString(b.layout) ? {
							type : b.layout
						} : b.layout || {}, {
							type : b.vertical ? "vbox" : "hbox",
							align : b.vertical ? "stretchmax" : "middle"
						});
				if (b.vertical) {
					b.addClsWithUI("vertical")
				}
				if (b.ui === "footer") {
					b.ignoreBorderManagement = true
				}
				b.callParent();
				b.addEvents("overflowchange");
				a = b.vertical ? ["up", "down"] : ["left", "right"];
				Ext.FocusManager.subscribe(b, {
							keys : a
						})
			},
			lookupComponent : function(b) {
				if (Ext.isString(b)) {
					var a = Ext.toolbar.Toolbar.shortcuts[b];
					if (a) {
						b = {
							xtype : a
						}
					} else {
						b = {
							xtype : "tbtext",
							text : b
						}
					}
					this.applyDefaults(b)
				}
				return this.callParent(arguments)
			},
			applyDefaults : function(b) {
				if (!Ext.isString(b)) {
					b = this.callParent(arguments);
					var a = this.internalDefaults;
					if (b.events) {
						Ext.applyIf(b.initialConfig, a);
						Ext.apply(b, a)
					} else {
						Ext.applyIf(b, a)
					}
				}
				return b
			},
			trackMenu : function(c, a) {
				if (this.trackMenus && c.menu) {
					var d = a ? "mun" : "mon", b = this;
					b[d](c, "menutriggerover", b.onButtonTriggerOver, b);
					b[d](c, "menushow", b.onButtonMenuShow, b);
					b[d](c, "menuhide", b.onButtonMenuHide, b)
				}
			},
			constructButton : function(a) {
				return a.events ? a : this.createComponent(a, a.split
								? "splitbutton"
								: this.defaultType)
			},
			onBeforeAdd : function(a) {
				if (a.is("field") || (a.is("button") && this.ui != "footer")) {
					a.ui = a.ui + "-toolbar"
				}
				if (a instanceof Ext.toolbar.Separator) {
					a.setUI((this.vertical) ? "vertical" : "horizontal")
				}
				this.callParent(arguments)
			},
			onAdd : function(a) {
				this.callParent(arguments);
				this.trackMenu(a);
				if (this.disabled) {
					a.disable()
				}
			},
			onRemove : function(a) {
				this.callParent(arguments);
				this.trackMenu(a, true)
			},
			onButtonTriggerOver : function(a) {
				if (this.activeMenuBtn && this.activeMenuBtn != a) {
					this.activeMenuBtn.hideMenu();
					a.showMenu();
					this.activeMenuBtn = a
				}
			},
			onButtonMenuShow : function(a) {
				this.activeMenuBtn = a
			},
			onButtonMenuHide : function(a) {
				delete this.activeMenuBtn
			}
		}, function() {
			this.shortcuts = {
				"-" : "tbseparator",
				" " : "tbspacer",
				"->" : "tbfill"
			}
		});
Ext.define("Ext.layout.container.Accordion", {
	extend : "Ext.layout.container.VBox",
	alias : ["layout.accordion"],
	alternateClassName : "Ext.layout.AccordionLayout",
	align : "stretch",
	fill : true,
	autoWidth : true,
	titleCollapse : true,
	hideCollapseTool : false,
	collapseFirst : false,
	animate : true,
	activeOnTop : false,
	multi : false,
	constructor : function() {
		var a = this;
		a.callParent(arguments);
		a.initialAnimate = a.animate;
		a.animate = false;
		if (a.fill === false) {
			a.itemCls = Ext.baseCSSPrefix + "accordion-item"
		}
	},
	beforeLayout : function() {
		var a = this;
		a.callParent(arguments);
		if (a.fill) {
			if (!a.owner.el.dom.style.height) {
				return false
			}
		} else {
			a.owner.componentLayout.monitorChildren = false;
			a.autoSize = true;
			a.owner.setAutoScroll(true)
		}
	},
	renderItems : function(g, e) {
		var h = this, f = g.length, c = 0, d, b = h.getLayoutTargetSize(), j = [], a;
		for (; c < f; c++) {
			d = g[c];
			if (!d.rendered) {
				j.push(d);
				if (h.collapseFirst) {
					d.collapseFirst = h.collapseFirst
				}
				if (h.hideCollapseTool) {
					d.hideCollapseTool = h.hideCollapseTool;
					d.titleCollapse = true
				} else {
					if (h.titleCollapse) {
						d.titleCollapse = h.titleCollapse
					}
				}
				delete d.hideHeader;
				d.collapsible = true;
				d.title = d.title || "&#160;";
				d.setBorder(false);
				d.width = b.width;
				if (h.fill) {
					delete d.height;
					delete d.flex;
					if (h.expandedItem !== undefined) {
						d.collapsed = true
					} else {
						if (d.collapsed === false) {
							d.flex = 1;
							h.expandedItem = c
						} else {
							d.collapsed = true
						}
					}
				} else {
					delete d.flex;
					d.animCollapse = h.initialAnimate;
					d.autoHeight = true;
					d.autoScroll = false
				}
			}
		}
		if (f && h.expandedItem === undefined) {
			h.expandedItem = 0;
			d = g[0];
			d.collapsed = false;
			if (h.fill) {
				d.flex = 1
			}
		}
		h.callParent(arguments);
		f = j.length;
		for (c = 0; c < f; c++) {
			d = j[c];
			delete d.width;
			d.header.addCls(Ext.baseCSSPrefix + "accordion-hd");
			d.body.addCls(Ext.baseCSSPrefix + "accordion-body");
			if (h.fill) {
				h.owner.mon(d, {
							show : h.onComponentShow,
							beforeexpand : h.onComponentExpand,
							beforecollapse : h.onComponentCollapse,
							scope : h
						})
			}
		}
	},
	onLayout : function() {
		var f = this;
		f.updatePanelClasses();
		if (f.fill) {
			f.callParent(arguments)
		} else {
			var e = f.getLayoutTargetSize(), c = f.getVisibleItems(), a = c.length, d = 0, b;
			for (; d < a; d++) {
				b = c[d];
				if (b.collapsed) {
					c[d].setWidth(e.width)
				} else {
					c[d].setSize(null, null)
				}
			}
		}
		return f
	},
	updatePanelClasses : function() {
		var c = this.getLayoutItems(), d = c.length, a = true, b, e;
		for (b = 0; b < d; b++) {
			e = c[b];
			if (!a) {
				e.header.addCls(Ext.baseCSSPrefix
						+ "accordion-hd-sibling-expanded")
			} else {
				e.header.removeCls(Ext.baseCSSPrefix
						+ "accordion-hd-sibling-expanded")
			}
			if (b + 1 == d && e.collapsed) {
				e.header.addCls(Ext.baseCSSPrefix
						+ "accordion-hd-last-collapsed")
			} else {
				e.header.removeCls(Ext.baseCSSPrefix
						+ "accordion-hd-last-collapsed")
			}
			a = e.collapsed
		}
	},
	onComponentExpand : function(f) {
		var e = this, d = e.owner.items.items, a = d.length, c = 0, b;
		for (; c < a; c++) {
			b = d[c];
			if (b === f && b.collapsed) {
				e.setExpanded(b)
			} else {
				if (!e.multi
						&& (b.rendered && b.header.rendered && b !== f && !b.collapsed)) {
					e.setCollapsed(b)
				}
			}
		}
		e.animate = e.initialAnimate;
		e.layout();
		e.animate = false;
		return false
	},
	onComponentCollapse : function(b) {
		var c = this, d = b.next() || b.prev(), a = c.multi ? c.owner
				.query(">panel:not([collapsed])") : [];
		if (c.multi) {
			c.setCollapsed(b);
			if (a.length === 1 && a[0] === b) {
				c.setExpanded(d)
			}
			c.animate = c.initialAnimate;
			c.layout();
			c.animate = false
		} else {
			if (d) {
				c.onComponentExpand(d)
			}
		}
		return false
	},
	onComponentShow : function(a) {
		this.onComponentExpand(a)
	},
	setCollapsed : function(b) {
		var e = b.getDockedItems(), d, a = e.length, c = 0;
		b.hiddenDocked = [];
		for (; c < a; c++) {
			d = e[c];
			if ((d !== b.header) && !d.hidden) {
				d.hidden = true;
				b.hiddenDocked.push(d)
			}
		}
		b.addCls(b.collapsedCls);
		b.header.addCls(b.collapsedHeaderCls);
		b.height = b.header.getHeight();
		b.el.setHeight(b.height);
		b.collapsed = true;
		delete b.flex;
		b.fireEvent("collapse", b);
		if (b.collapseTool) {
			b.collapseTool.setType("expand-"
					+ b.getOppositeDirection(b.collapseDirection))
		}
	},
	setExpanded : function(b) {
		var d = b.hiddenDocked, a = d ? d.length : 0, c = 0;
		for (; c < a; c++) {
			d[c].hidden = false
		}
		if (!b.body.isVisible()) {
			b.body.show()
		}
		delete b.collapsed;
		delete b.height;
		delete b.componentLayout.lastComponentSize;
		b.suspendLayout = false;
		b.flex = 1;
		b.removeCls(b.collapsedCls);
		b.header.removeCls(b.collapsedHeaderCls);
		b.fireEvent("expand", b);
		if (b.collapseTool) {
			b.collapseTool.setType("collapse-" + b.collapseDirection)
		}
		b.setAutoScroll(b.initialConfig.autoScroll)
	}
});
Ext.define("Ext.panel.AbstractPanel", {
	extend : "Ext.container.Container",
	requires : ["Ext.util.MixedCollection", "Ext.core.Element",
			"Ext.toolbar.Toolbar"],
	baseCls : Ext.baseCSSPrefix + "panel",
	isPanel : true,
	componentLayout : "dock",
	renderTpl : ['<div class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl> {baseCls}-body-{ui}<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],
	border : true,
	initComponent : function() {
		var a = this;
		a.addEvents("bodyresize");
		Ext.applyIf(a.renderSelectors, {
					body : "." + a.baseCls + "-body"
				});
		if (a.frame && a.border && a.bodyBorder === undefined) {
			a.bodyBorder = false
		}
		if (a.frame && a.border
				&& (a.bodyBorder === false || a.bodyBorder === 0)) {
			a.manageBodyBorders = true
		}
		a.callParent()
	},
	initItems : function() {
		var b = this, a = b.dockedItems;
		b.callParent();
		b.dockedItems = Ext.create("Ext.util.MixedCollection", false,
				b.getComponentId);
		if (a) {
			b.addDocked(a)
		}
	},
	getDockedComponent : function(a) {
		if (Ext.isObject(a)) {
			a = a.getItemId()
		}
		return this.dockedItems.get(a)
	},
	getComponent : function(a) {
		var b = this.callParent(arguments);
		if (b === undefined && !Ext.isNumber(a)) {
			b = this.getDockedComponent(a)
		}
		return b
	},
	initBodyStyles : function() {
		var d = this, a = d.bodyStyle, c = [], b = Ext.core.Element, e;
		if (Ext.isFunction(a)) {
			a = a()
		}
		if (Ext.isString(a)) {
			c = a.split(";")
		} else {
			for (e in a) {
				if (a.hasOwnProperty(e)) {
					c.push(e + ":" + a[e])
				}
			}
		}
		if (d.bodyPadding !== undefined) {
			c.push("padding: "
					+ b
							.unitizeBox((d.bodyPadding === true)
									? 5
									: d.bodyPadding))
		}
		if (d.frame && d.bodyBorder) {
			if (!Ext.isNumber(d.bodyBorder)) {
				d.bodyBorder = 1
			}
			c.push("border-width: " + b.unitizeBox(d.bodyBorder))
		}
		delete d.bodyStyle;
		return c.length ? c.join(";") : undefined
	},
	initBodyCls : function() {
		var b = this, a = "", c = b.bodyCls;
		if (c) {
			Ext.each(c, function(d) {
						a += " " + d
					});
			delete b.bodyCls
		}
		return a.length > 0 ? a : undefined
	},
	initRenderData : function() {
		return Ext.applyIf(this.callParent(), {
					bodyStyle : this.initBodyStyles(),
					bodyCls : this.initBodyCls()
				})
	},
	addDocked : function(a, f) {
		var e = this, b = 0, d, c;
		a = e.prepareItems(a);
		c = a.length;
		for (; b < c; b++) {
			d = a[b];
			d.dock = d.dock || "top";
			if (e.border === false) {
			}
			if (f !== undefined) {
				e.dockedItems.insert(f + b, d)
			} else {
				e.dockedItems.add(d)
			}
			d.onAdded(e, b);
			e.onDockedAdd(d)
		}
		if (e.rendered) {
			e.doComponentLayout()
		}
		return a
	},
	onDockedAdd : Ext.emptyFn,
	onDockedRemove : Ext.emptyFn,
	insertDocked : function(b, a) {
		this.addDocked(a, b)
	},
	removeDocked : function(e, b) {
		var d = this, c, a;
		if (!d.dockedItems.contains(e)) {
			return e
		}
		c = d.componentLayout;
		a = c && d.rendered;
		if (a) {
			c.onRemove(e)
		}
		d.dockedItems.remove(e);
		e.onRemoved();
		d.onDockedRemove(e);
		if (b === true || (b !== false && d.autoDestroy)) {
			e.destroy()
		}
		if (a && !b) {
			c.afterRemove(e)
		}
		if (!this.destroying) {
			d.doComponentLayout()
		}
		return e
	},
	getDockedItems : function(c) {
		var d = this, b = {
			top : 1,
			left : 3,
			right : 5,
			bottom : 7
		}, a;
		if (d.dockedItems && d.dockedItems.items.length) {
			if (c) {
				a = Ext.ComponentQuery.query(c, d.dockedItems.items)
			} else {
				a = d.dockedItems.items.slice()
			}
			Ext.Array.sort(a, function(f, e) {
						var g = f.weight || b[f.dock], h = e.weight
								|| b[e.dock];
						if (Ext.isNumber(g) && Ext.isNumber(h)) {
							return g - h
						}
						return 0
					});
			return a
		}
		return []
	},
	addUIClsToElement : function(a, c) {
		var b = this;
		b.callParent(arguments);
		if (!c && b.rendered) {
			b.body.addCls(Ext.baseCSSPrefix + a);
			b.body.addCls(b.baseCls + "-body-" + a);
			b.body.addCls(b.baseCls + "-body-" + b.ui + "-" + a)
		}
	},
	removeUIClsFromElement : function(a, c) {
		var b = this;
		b.callParent(arguments);
		if (!c && b.rendered) {
			b.body.removeCls(Ext.baseCSSPrefix + a);
			b.body.removeCls(b.baseCls + "-body-" + a);
			b.body.removeCls(b.baseCls + "-body-" + b.ui + "-" + a)
		}
	},
	addUIToElement : function(b) {
		var a = this;
		a.callParent(arguments);
		if (!b && a.rendered) {
			a.body.addCls(a.baseCls + "-body-" + a.ui)
		}
	},
	removeUIFromElement : function() {
		var a = this;
		a.callParent(arguments);
		if (a.rendered) {
			a.body.removeCls(a.baseCls + "-body-" + a.ui)
		}
	},
	getTargetEl : function() {
		return this.body
	},
	getRefItems : function(a) {
		var b = this.callParent(arguments), d = this.getDockedItems(a
				? "*,* *"
				: undefined), f = d.length, c = 0, e;
		for (; c < f; c++) {
			e = d[c];
			if (e.dock === "right" || e.dock === "bottom") {
				break
			}
		}
		return d.splice(0, c).concat(b).concat(d)
	},
	beforeDestroy : function() {
		var b = this.dockedItems, a;
		if (b) {
			while ((a = b.first())) {
				this.removeDocked(a, true)
			}
		}
		this.callParent()
	},
	setBorder : function(a) {
		var b = this;
		b.border = (a !== undefined) ? a : true;
		if (b.rendered) {
			b.doComponentLayout()
		}
	}
});
Ext.define("Ext.data.writer.Json", {
			extend : "Ext.data.writer.Writer",
			alternateClassName : "Ext.data.JsonWriter",
			alias : "writer.json",
			root : undefined,
			encode : false,
			allowSingle : true,
			writeRecords : function(b, c) {
				var a = this.root;
				if (this.allowSingle && c.length == 1) {
					c = c[0]
				}
				if (this.encode) {
					if (a) {
						b.params[a] = Ext.encode(c)
					} else {
					}
				} else {
					b.jsonData = b.jsonData || {};
					if (a) {
						b.jsonData[a] = c
					} else {
						b.jsonData = c
					}
				}
				return b
			}
		});
Ext.define("Ext.layout.container.AbstractFit", {
			extend : "Ext.layout.container.Container",
			itemCls : Ext.baseCSSPrefix + "fit-item",
			targetCls : Ext.baseCSSPrefix + "layout-fit",
			type : "fit"
		});
Ext.define("Ext.layout.container.Fit", {
			extend : "Ext.layout.container.AbstractFit",
			alias : "layout.fit",
			alternateClassName : "Ext.layout.FitLayout",
			onLayout : function() {
				var a = this;
				a.callParent();
				if (a.owner.items.length) {
					a.setItemBox(a.owner.items.get(0), a.getLayoutTargetSize())
				}
			},
			getTargetBox : function() {
				return this.getLayoutTargetSize()
			},
			setItemBox : function(c, b) {
				var a = this;
				if (c && b.height > 0) {
					if (a.isManaged("width") === true) {
						b.width = undefined
					}
					if (a.isManaged("height") === true) {
						b.height = undefined
					}
					a.setItemSize(c, b.width, b.height)
				}
			}
		});
Ext.define("Ext.layout.container.AbstractCard", {
	extend : "Ext.layout.container.Fit",
	type : "card",
	sizeAllCards : false,
	hideInactive : true,
	deferredRender : false,
	beforeLayout : function() {
		var a = this;
		a.activeItem = a.getActiveItem();
		if (a.activeItem && a.deferredRender) {
			a.renderItems([a.activeItem], a.getRenderTarget());
			return true
		} else {
			return this.callParent(arguments)
		}
	},
	onLayout : function() {
		var f = this, g = f.activeItem, b = f.getVisibleItems(), e = b.length, a = f
				.getTargetBox(), c, d;
		for (c = 0; c < e; c++) {
			d = b[c];
			f.setItemBox(d, a)
		}
		if (!f.firstActivated && g) {
			if (g.fireEvent("beforeactivate", g) !== false) {
				g.fireEvent("activate", g)
			}
			f.firstActivated = true
		}
	},
	isValidParent : function(c, d, a) {
		var b = c.el ? c.el.dom : Ext.getDom(c);
		return (b && b.parentNode === (d.dom || d)) || false
	},
	getActiveItem : function() {
		var a = this;
		if (!a.activeItem && a.owner) {
			a.activeItem = a.parseActiveItem(a.owner.activeItem)
		}
		if (a.activeItem && a.owner.items.indexOf(a.activeItem) != -1) {
			return a.activeItem
		}
		return null
	},
	parseActiveItem : function(a) {
		if (a && a.isComponent) {
			return a
		} else {
			if (typeof a == "number" || a === undefined) {
				return this.getLayoutItems()[a || 0]
			} else {
				return this.owner.getComponent(a)
			}
		}
	},
	configureItem : function(b, a) {
		this.callParent([b, a]);
		if (this.hideInactive && this.activeItem !== b) {
			b.hide()
		} else {
			b.show()
		}
	},
	onRemove : function(a) {
		if (a === this.activeItem) {
			this.activeItem = null;
			if (this.owner.items.getCount() === 0) {
				this.firstActivated = false
			}
		}
	},
	getAnimation : function(b, a) {
		var c = (b || {}).cardSwitchAnimation;
		if (c === false) {
			return false
		}
		return c || a.cardSwitchAnimation
	},
	getNext : function(c) {
		var a = this.getLayoutItems(), b = Ext.Array
				.indexOf(a, this.activeItem);
		return a[b + 1] || (c ? a[0] : false)
	},
	next : function(b, a) {
		return this.setActiveItem(this.getNext(a), b)
	},
	getPrev : function(c) {
		var a = this.getLayoutItems(), b = Ext.Array
				.indexOf(a, this.activeItem);
		return a[b - 1] || (c ? a[a.length - 1] : false)
	},
	prev : function(b, a) {
		return this.setActiveItem(this.getPrev(a), b)
	}
});
Ext.define("Ext.layout.container.Card", {
			alias : ["layout.card"],
			alternateClassName : "Ext.layout.CardLayout",
			extend : "Ext.layout.container.AbstractCard",
			setActiveItem : function(b) {
				var e = this, a = e.owner, d = e.activeItem, c;
				e.layoutBusy = true;
				b = e.parseActiveItem(b);
				c = a.items.indexOf(b);
				if (c == -1) {
					c = a.items.items.length;
					a.add(b)
				}
				if (b && d != b) {
					if (!b.rendered) {
						e.renderItem(b, e.getRenderTarget(), a.items.length);
						e.configureItem(b, 0)
					}
					e.activeItem = b;
					if (b.fireEvent("beforeactivate", b, d) === false) {
						e.layoutBusy = false;
						return false
					}
					if (d && d.fireEvent("beforedeactivate", d, b) === false) {
						e.layoutBusy = false;
						return false
					}
					if (!e.sizeAllCards) {
						e.setItemBox(b, e.getTargetBox())
					} else {
						e.onLayout()
					}
					if (d) {
						if (e.hideInactive) {
							d.hide()
						}
						d.fireEvent("deactivate", d, b)
					}
					if (b.hidden) {
						b.show()
					}
					b.fireEvent("activate", b, d);
					e.layoutBusy = false;
					if (!e.sizeAllCards) {
						if (!a.componentLayout.layoutBusy) {
							e.onLayout()
						}
					}
					return b
				}
				e.layoutBusy = false;
				return false
			}
		});
Ext.define("Ext.data.reader.Reader", {
	requires : ["Ext.data.ResultSet"],
	alternateClassName : ["Ext.data.Reader", "Ext.data.DataReader"],
	totalProperty : "total",
	successProperty : "success",
	root : "",
	implicitIncludes : true,
	isReader : true,
	constructor : function(a) {
		var b = this;
		Ext.apply(b, a || {});
		b.fieldCount = 0;
		b.model = Ext.ModelManager.getModel(a.model);
		if (b.model) {
			b.buildExtractors()
		}
	},
	setModel : function(a, c) {
		var b = this;
		b.model = Ext.ModelManager.getModel(a);
		b.buildExtractors(true);
		if (c && b.proxy) {
			b.proxy.setModel(b.model, true)
		}
	},
	read : function(a) {
		var b = a;
		if (a && a.responseText) {
			b = this.getResponseData(a)
		}
		if (b) {
			return this.readRecords(b)
		} else {
			return this.nullResultSet
		}
	},
	readRecords : function(c) {
		var d = this;
		if (d.fieldCount !== d.getFields().length) {
			d.buildExtractors(true)
		}
		d.rawData = c;
		c = d.getData(c);
		var f = Ext.isArray(c) ? c : d.getRoot(c), h = true, b = 0, e, g, a, i;
		if (f) {
			e = f.length
		}
		if (d.totalProperty) {
			g = parseInt(d.getTotal(c), 10);
			if (!isNaN(g)) {
				e = g
			}
		}
		if (d.successProperty) {
			g = d.getSuccess(c);
			if (g === false || g === "false") {
				h = false
			}
		}
		if (d.messageProperty) {
			i = d.getMessage(c)
		}
		if (f) {
			a = d.extractData(f);
			b = a.length
		} else {
			b = 0;
			a = []
		}
		return Ext.create("Ext.data.ResultSet", {
					total : e || b,
					count : b,
					records : a,
					success : h,
					message : i
				})
	},
	extractData : function(j) {
		var h = this, k = [], e = [], d = h.model, f = 0, b = j.length, l = h
				.getIdProperty(), c, a, g;
		if (!j.length && Ext.isObject(j)) {
			j = [j];
			b = 1
		}
		for (; f < b; f++) {
			c = j[f];
			k = h.extractValues(c);
			a = h.getId(c);
			g = new d(k, a);
			g.raw = c;
			e.push(g);
			if (h.implicitIncludes) {
				h.readAssociated(g, c)
			}
		}
		return e
	},
	readAssociated : function(g, e) {
		var d = g.associations.items, f = 0, a = d.length, c, b, j, h;
		for (; f < a; f++) {
			c = d[f];
			b = this.getAssociatedDataRoot(e, c.associationKey || c.name);
			if (b) {
				h = c.getReader();
				if (!h) {
					j = c.associatedModel.proxy;
					if (j) {
						h = j.getReader()
					} else {
						h = new this.constructor({
									model : c.associatedName
								})
					}
				}
				c.read(g, h, b)
			}
		}
	},
	getAssociatedDataRoot : function(b, a) {
		return b[a]
	},
	getFields : function() {
		return this.model.prototype.fields.items
	},
	extractValues : function(f) {
		var a = this.getFields(), c = 0, d = a.length, b = {}, g, e;
		for (; c < d; c++) {
			g = a[c];
			e = this.extractorFunctions[c](f);
			b[g.name] = e
		}
		return b
	},
	getData : function(a) {
		return a
	},
	getRoot : function(a) {
		return a
	},
	getResponseData : function(a) {
	},
	onMetaChange : function(c) {
		var a = c.fields, b;
		Ext.apply(this, c);
		if (a) {
			b = Ext.define("Ext.data.reader.Json-Model" + Ext.id(), {
						extend : "Ext.data.Model",
						fields : a
					});
			this.setModel(b, true)
		} else {
			this.buildExtractors(true)
		}
	},
	getIdProperty : function() {
		var a = this.idProperty;
		if (Ext.isEmpty(a)) {
			a = this.model.prototype.idProperty
		}
		return a
	},
	buildExtractors : function(e) {
		var c = this, g = c.getIdProperty(), d = c.totalProperty, b = c.successProperty, f = c.messageProperty, a;
		if (e === true) {
			delete c.extractorFunctions
		}
		if (c.extractorFunctions) {
			return
		}
		if (d) {
			c.getTotal = c.createAccessor(d)
		}
		if (b) {
			c.getSuccess = c.createAccessor(b)
		}
		if (f) {
			c.getMessage = c.createAccessor(f)
		}
		if (g) {
			a = c.createAccessor(g);
			c.getId = function(h) {
				var i = a.call(c, h);
				return (i === undefined || i === "") ? null : i
			}
		} else {
			c.getId = function() {
				return null
			}
		}
		c.buildFieldExtractors()
	},
	buildFieldExtractors : function() {
		var d = this, a = d.getFields(), c = a.length, b = 0, g = [], f, e;
		for (; b < c; b++) {
			f = a[b];
			e = (f.mapping !== undefined && f.mapping !== null)
					? f.mapping
					: f.name;
			g.push(d.createAccessor(e))
		}
		d.fieldCount = c;
		d.extractorFunctions = g
	}
}, function() {
	Ext.apply(this, {
				nullResultSet : Ext.create("Ext.data.ResultSet", {
							total : 0,
							count : 0,
							records : [],
							success : true
						})
			})
});
Ext.define("Ext.data.reader.Json", {
	extend : "Ext.data.reader.Reader",
	alternateClassName : "Ext.data.JsonReader",
	alias : "reader.json",
	root : "",
	useSimpleAccessors : false,
	readRecords : function(a) {
		if (a.metaData) {
			this.onMetaChange(a.metaData)
		}
		this.jsonData = a;
		return this.callParent([a])
	},
	getResponseData : function(a) {
		try {
			var c = Ext.decode(a.responseText)
		} catch (b) {
			Ext.Error.raise({
						response : a,
						json : a.responseText,
						parseError : b,
						msg : "Unable to parse the JSON returned by the server: "
								+ b.toString()
					})
		}
		return c
	},
	buildExtractors : function() {
		var a = this;
		a.callParent(arguments);
		if (a.root) {
			a.getRoot = a.createAccessor(a.root)
		} else {
			a.getRoot = function(b) {
				return b
			}
		}
	},
	extractData : function(a) {
		var e = this.record, d = [], c, b;
		if (e) {
			c = a.length;
			for (b = 0; b < c; b++) {
				d[b] = a[b][e]
			}
		} else {
			d = a
		}
		return this.callParent([d])
	},
	createAccessor : function() {
		var a = /[\[\.]/;
		return function(c) {
			if (Ext.isEmpty(c)) {
				return Ext.emptyFn
			}
			if (Ext.isFunction(c)) {
				return c
			}
			if (this.useSimpleAccessors !== true) {
				var b = String(c).search(a);
				if (b >= 0) {
					return Ext.functionFactory("obj", "return obj"
									+ (b > 0 ? "." : "") + c)
				}
			}
			return function(d) {
				return d[c]
			}
		}
	}()
});
Ext.define("Ext.data.proxy.Proxy", {
	alias : "proxy.proxy",
	alternateClassName : ["Ext.data.DataProxy", "Ext.data.Proxy"],
	requires : ["Ext.data.reader.Json", "Ext.data.writer.Json"],
	uses : ["Ext.data.Batch", "Ext.data.Operation", "Ext.data.Model"],
	mixins : {
		observable : "Ext.util.Observable"
	},
	batchOrder : "create,update,destroy",
	batchActions : true,
	defaultReaderType : "json",
	defaultWriterType : "json",
	isProxy : true,
	constructor : function(a) {
		a = a || {};
		if (a.model === undefined) {
			delete a.model
		}
		this.mixins.observable.constructor.call(this, a);
		if (this.model !== undefined && !(this.model instanceof Ext.data.Model)) {
			this.setModel(this.model)
		}
	},
	setModel : function(b, c) {
		this.model = Ext.ModelManager.getModel(b);
		var a = this.reader, d = this.writer;
		this.setReader(a);
		this.setWriter(d);
		if (c && this.store) {
			this.store.setModel(this.model)
		}
	},
	getModel : function() {
		return this.model
	},
	setReader : function(a) {
		var b = this;
		if (a === undefined || typeof a == "string") {
			a = {
				type : a
			}
		}
		if (a.isReader) {
			a.setModel(b.model)
		} else {
			Ext.applyIf(a, {
						proxy : b,
						model : b.model,
						type : b.defaultReaderType
					});
			a = Ext.createByAlias("reader." + a.type, a)
		}
		b.reader = a;
		return b.reader
	},
	getReader : function() {
		return this.reader
	},
	setWriter : function(a) {
		if (a === undefined || typeof a == "string") {
			a = {
				type : a
			}
		}
		if (!(a instanceof Ext.data.writer.Writer)) {
			Ext.applyIf(a, {
						model : this.model,
						type : this.defaultWriterType
					});
			a = Ext.createByAlias("writer." + a.type, a)
		}
		this.writer = a;
		return this.writer
	},
	getWriter : function() {
		return this.writer
	},
	create : Ext.emptyFn,
	read : Ext.emptyFn,
	update : Ext.emptyFn,
	destroy : Ext.emptyFn,
	batch : function(d, e) {
		var f = this, c = Ext.create("Ext.data.Batch", {
					proxy : f,
					listeners : e || {}
				}), b = f.batchActions, a;
		Ext.each(f.batchOrder.split(","), function(g) {
					a = d[g];
					if (a) {
						if (b) {
							c.add(Ext.create("Ext.data.Operation", {
										action : g,
										records : a
									}))
						} else {
							Ext.each(a, function(h) {
										c.add(Ext.create("Ext.data.Operation",
												{
													action : g,
													records : [h]
												}))
									})
						}
					}
				}, f);
		c.start();
		return c
	}
}, function() {
	Ext.data.DataProxy = this
});
Ext.define("Ext.data.proxy.Server", {
	extend : "Ext.data.proxy.Proxy",
	alias : "proxy.server",
	alternateClassName : "Ext.data.ServerProxy",
	uses : ["Ext.data.Request"],
	pageParam : "page",
	startParam : "start",
	limitParam : "limit",
	groupParam : "group",
	sortParam : "sort",
	filterParam : "filter",
	directionParam : "dir",
	simpleSortMode : false,
	noCache : true,
	cacheString : "_dc",
	timeout : 30000,
	constructor : function(a) {
		var b = this;
		a = a || {};
		this.addEvents("exception");
		b.callParent([a]);
		b.extraParams = a.extraParams || {};
		b.api = a.api || {};
		b.nocache = b.noCache
	},
	create : function() {
		return this.doRequest.apply(this, arguments)
	},
	read : function() {
		return this.doRequest.apply(this, arguments)
	},
	update : function() {
		return this.doRequest.apply(this, arguments)
	},
	destroy : function() {
		return this.doRequest.apply(this, arguments)
	},
	buildRequest : function(a) {
		var c = Ext.applyIf(a.params || {}, this.extraParams || {}), b;
		c = Ext.applyIf(c, this.getParams(c, a));
		if (a.id && !c.id) {
			c.id = a.id
		}
		b = Ext.create("Ext.data.Request", {
					params : c,
					action : a.action,
					records : a.records,
					operation : a,
					url : a.url
				});
		b.url = this.buildUrl(b);
		a.request = b;
		return b
	},
	processResponse : function(m, c, e, d, l, n) {
		var j = this, h, o, b, a, k, g, f;
		if (m === true) {
			h = j.getReader();
			o = h.read(j.extractResponseData(d));
			b = o.records;
			a = b.length;
			if (o.success !== false) {
				k = Ext.create("Ext.util.MixedCollection", true, function(i) {
							return i.getId()
						});
				k.addAll(c.records);
				for (f = 0; f < a; f++) {
					g = k.get(b[f].getId());
					if (g) {
						g.beginEdit();
						g.set(g.data);
						g.endEdit(true)
					}
				}
				Ext.apply(c, {
							response : d,
							resultSet : o
						});
				c.setCompleted();
				c.setSuccessful()
			} else {
				c.setException(o.message);
				j.fireEvent("exception", this, d, c)
			}
		} else {
			j.setException(c, d);
			j.fireEvent("exception", this, d, c)
		}
		if (typeof l == "function") {
			l.call(n || j, c)
		}
		j.afterRequest(e, m)
	},
	setException : function(b, a) {
		b.setException({
					status : a.status,
					statusText : a.statusText
				})
	},
	extractResponseData : function(a) {
		return a
	},
	applyEncoding : function(a) {
		return Ext.encode(a)
	},
	encodeSorters : function(d) {
		var b = [], c = d.length, a = 0;
		for (; a < c; a++) {
			b[a] = {
				property : d[a].property,
				direction : d[a].direction
			}
		}
		return this.applyEncoding(b)
	},
	encodeFilters : function(d) {
		var b = [], c = d.length, a = 0;
		for (; a < c; a++) {
			b[a] = {
				property : d[a].property,
				value : d[a].value
			}
		}
		return this.applyEncoding(b)
	},
	getParams : function(q, k) {
		q = q || {};
		var r = this, n = Ext.isDefined, o = k.groupers, a = k.sorters, i = k.filters, g = k.page, f = k.start, p = k.limit, h = r.simpleSortMode, m = r.pageParam, d = r.startParam, b = r.limitParam, c = r.groupParam, e = r.sortParam, l = r.filterParam, j = r.directionParam;
		if (m && n(g)) {
			q[m] = g
		}
		if (d && n(f)) {
			q[d] = f
		}
		if (b && n(p)) {
			q[b] = p
		}
		if (c && o && o.length > 0) {
			q[c] = r.encodeSorters(o)
		}
		if (e && a && a.length > 0) {
			if (h) {
				q[e] = a[0].property;
				q[j] = a[0].direction
			} else {
				q[e] = r.encodeSorters(a)
			}
		}
		if (l && i && i.length > 0) {
			q[l] = r.encodeFilters(i)
		}
		return q
	},
	buildUrl : function(c) {
		var b = this, a = b.getUrl(c);
		if (b.noCache) {
			a = Ext.urlAppend(a, Ext.String.format("{0}={1}", b.cacheString,
							Ext.Date.now()))
		}
		return a
	},
	getUrl : function(a) {
		return a.url || this.api[a.action] || this.url
	},
	doRequest : function(a, c, b) {
	},
	afterRequest : Ext.emptyFn,
	onDestroy : function() {
		Ext.destroy(this.reader, this.writer)
	}
});
Ext.define("Ext.data.proxy.Ajax", {
			requires : ["Ext.util.MixedCollection", "Ext.Ajax"],
			extend : "Ext.data.proxy.Server",
			alias : "proxy.ajax",
			alternateClassName : ["Ext.data.HttpProxy", "Ext.data.AjaxProxy"],
			actionMethods : {
				create : "POST",
				read : "GET",
				update : "POST",
				destroy : "POST"
			},
			doRequest : function(a, e, b) {
				var d = this.getWriter(), c = this.buildRequest(a, e, b);
				if (a.allowWrite()) {
					c = d.write(c)
				}
				Ext.apply(c, {
							headers : this.headers,
							timeout : this.timeout,
							scope : this,
							callback : this.createRequestCallback(c, a, e, b),
							method : this.getMethod(c),
							disableCaching : false
						});
				Ext.Ajax.request(c);
				return c
			},
			getMethod : function(a) {
				return this.actionMethods[a.action]
			},
			createRequestCallback : function(d, a, e, b) {
				var c = this;
				return function(g, h, f) {
					c.processResponse(h, a, d, f, e, b)
				}
			}
		}, function() {
			Ext.data.HttpProxy = this
		});
Ext.define("Ext.data.Model", {
	alternateClassName : "Ext.data.Record",
	mixins : {
		observable : "Ext.util.Observable"
	},
	requires : ["Ext.ModelManager", "Ext.data.Field", "Ext.data.Errors",
			"Ext.data.Operation", "Ext.data.validations",
			"Ext.data.proxy.Ajax", "Ext.util.MixedCollection"],
	onClassExtended : function(a, b) {
		var c = b.onBeforeClassCreated;
		b.onBeforeClassCreated = function(d, w) {
			var v = this, x = Ext.getClassName(d), l = d.prototype, p = d.prototype.superclass, e = w.validations
					|| [], n = w.fields || [], r = w.associations || [], q = w.belongsTo, m = w.hasMany, t = new Ext.util.MixedCollection(
					false, function(i) {
						return i.name
					}), s = new Ext.util.MixedCollection(false, function(i) {
						return i.name
					}), k = p.validations, u = p.fields, g = p.associations, f, o, h, j = [];
			d.modelName = x;
			l.modelName = x;
			if (k) {
				e = k.concat(e)
			}
			w.validations = e;
			if (u) {
				n = u.items.concat(n)
			}
			for (o = 0, h = n.length; o < h; ++o) {
				t.add(new Ext.data.Field(n[o]))
			}
			w.fields = t;
			if (q) {
				q = Ext.Array.from(q);
				for (o = 0, h = q.length; o < h; ++o) {
					f = q[o];
					if (!Ext.isObject(f)) {
						f = {
							model : f
						}
					}
					f.type = "belongsTo";
					r.push(f)
				}
				delete w.belongsTo
			}
			if (m) {
				m = Ext.Array.from(m);
				for (o = 0, h = m.length; o < h; ++o) {
					f = m[o];
					if (!Ext.isObject(f)) {
						f = {
							model : f
						}
					}
					f.type = "hasMany";
					r.push(f)
				}
				delete w.hasMany
			}
			if (g) {
				r = g.items.concat(r)
			}
			for (o = 0, h = r.length; o < h; ++o) {
				j.push("association." + r[o].type.toLowerCase())
			}
			if (w.proxy) {
				if (typeof w.proxy === "string") {
					j.push("proxy." + w.proxy)
				} else {
					if (typeof w.proxy.type === "string") {
						j.push("proxy." + w.proxy.type)
					}
				}
			}
			Ext.require(j, function() {
						Ext.ModelManager.registerType(x, d);
						for (o = 0, h = r.length; o < h; ++o) {
							f = r[o];
							Ext.apply(f, {
										ownerModel : x,
										associatedModel : f.model
									});
							if (Ext.ModelManager.getModel(f.model) === undefined) {
								Ext.ModelManager.registerDeferredAssociation(f)
							} else {
								s.add(Ext.data.Association.create(f))
							}
						}
						w.associations = s;
						c.call(v, d, w);
						d.setProxy(d.prototype.proxy
								|| d.prototype.defaultProxyType);
						Ext.ModelManager.onModelDefined(d)
					})
		}
	},
	inheritableStatics : {
		setProxy : function(a) {
			if (!a.isProxy) {
				if (typeof a == "string") {
					a = {
						type : a
					}
				}
				a = Ext.createByAlias("proxy." + a.type, a)
			}
			a.setModel(this);
			this.proxy = this.prototype.proxy = a;
			return a
		},
		getProxy : function() {
			return this.proxy
		},
		load : function(f, c) {
			c = Ext.apply({}, c);
			c = Ext.applyIf(c, {
						action : "read",
						id : f
					});
			var b = Ext.create("Ext.data.Operation", c), d = c.scope || this, a = null, e;
			e = function(g) {
				if (g.wasSuccessful()) {
					a = g.getRecords()[0];
					Ext.callback(c.success, d, [a, g])
				} else {
					Ext.callback(c.failure, d, [a, g])
				}
				Ext.callback(c.callback, d, [a, g])
			};
			this.proxy.read(b, e, this)
		}
	},
	statics : {
		PREFIX : "ext-record",
		AUTO_ID : 1,
		EDIT : "edit",
		REJECT : "reject",
		COMMIT : "commit",
		id : function(a) {
			var b = [this.PREFIX, "-", this.AUTO_ID++].join("");
			a.phantom = true;
			a.internalId = b;
			return b
		}
	},
	editing : false,
	dirty : false,
	persistanceProperty : "data",
	evented : false,
	isModel : true,
	phantom : false,
	idProperty : "id",
	defaultProxyType : "ajax",
	constructor : function(d, b) {
		d = d || {};
		var h = this, g, c, j, a, e, f = Ext.isArray(d), k = f ? {} : null;
		h.internalId = (b || b === 0) ? b : Ext.data.Model.id(h);
		Ext.applyIf(h, {
					data : {}
				});
		h.modified = {};
		h[h.persistanceProperty] = {};
		h.mixins.observable.constructor.call(h);
		g = h.fields.items;
		c = g.length;
		for (e = 0; e < c; e++) {
			j = g[e];
			a = j.name;
			if (f) {
				k[a] = d[e]
			} else {
				if (d[a] === undefined) {
					d[a] = j.defaultValue
				}
			}
		}
		h.set(k || d);
		h.dirty = false;
		h.modified = {};
		if (h.getId()) {
			h.phantom = false
		}
		if (typeof h.init == "function") {
			h.init()
		}
		h.id = h.modelName + "-" + h.internalId;
		Ext.ModelManager.register(h)
	},
	get : function(a) {
		return this[this.persistanceProperty][a]
	},
	set : function(k, f) {
		var d = this, c = d.fields, j = d.modified, b = [], e, h, a, g;
		if (arguments.length == 1 && Ext.isObject(k)) {
			for (h in k) {
				if (k.hasOwnProperty(h)) {
					e = c.get(h);
					if (e && e.convert !== e.type.convert) {
						b.push(h);
						continue
					}
					d.set(h, k[h])
				}
			}
			for (a = 0; a < b.length; a++) {
				e = b[a];
				d.set(e, k[e])
			}
		} else {
			if (c) {
				e = c.get(k);
				if (e && e.convert) {
					f = e.convert(f, d)
				}
			}
			g = d.get(k);
			d[d.persistanceProperty][k] = f;
			if (e && e.persist && !d.isEqual(g, f)) {
				d.dirty = true;
				d.modified[k] = g
			}
			if (!d.editing) {
				d.afterEdit()
			}
		}
	},
	isEqual : function(d, c) {
		if (Ext.isDate(d) && Ext.isDate(c)) {
			return d.getTime() === c.getTime()
		}
		return d === c
	},
	beginEdit : function() {
		var a = this;
		if (!a.editing) {
			a.editing = true;
			a.dirtySave = a.dirty;
			a.dataSave = Ext.apply({}, a[a.persistanceProperty]);
			a.modifiedSave = Ext.apply({}, a.modified)
		}
	},
	cancelEdit : function() {
		var a = this;
		if (a.editing) {
			a.editing = false;
			a.modified = a.modifiedSave;
			a[a.persistanceProperty] = a.dataSave;
			a.dirty = a.dirtySave;
			delete a.modifiedSave;
			delete a.dataSave;
			delete a.dirtySave
		}
	},
	endEdit : function(a) {
		var b = this;
		if (b.editing) {
			b.editing = false;
			delete b.modifiedSave;
			delete b.dataSave;
			delete b.dirtySave;
			if (a !== true && b.dirty) {
				b.afterEdit()
			}
		}
	},
	getChanges : function() {
		var a = this.modified, b = {}, c;
		for (c in a) {
			if (a.hasOwnProperty(c)) {
				b[c] = this.get(c)
			}
		}
		return b
	},
	isModified : function(a) {
		return this.modified.hasOwnProperty(a)
	},
	setDirty : function() {
		var b = this, a;
		b.dirty = true;
		b.fields.each(function(c) {
					if (c.persist) {
						a = c.name;
						b.modified[a] = b.get(a)
					}
				}, b)
	},
	reject : function(a) {
		var c = this, b = c.modified, d;
		for (d in b) {
			if (b.hasOwnProperty(d)) {
				if (typeof b[d] != "function") {
					c[c.persistanceProperty][d] = b[d]
				}
			}
		}
		c.dirty = false;
		c.editing = false;
		c.modified = {};
		if (a !== true) {
			c.afterReject()
		}
	},
	commit : function(a) {
		var b = this;
		b.dirty = false;
		b.editing = false;
		b.modified = {};
		if (a !== true) {
			b.afterCommit()
		}
	},
	copy : function(a) {
		var b = this;
		return new b.self(Ext.apply({}, b[b.persistanceProperty]), a
						|| b.internalId)
	},
	setProxy : function(a) {
		if (!a.isProxy) {
			if (typeof a === "string") {
				a = {
					type : a
				}
			}
			a = Ext.createByAlias("proxy." + a.type, a)
		}
		a.setModel(this.self);
		this.proxy = a;
		return a
	},
	getProxy : function() {
		return this.proxy
	},
	validate : function() {
		var j = Ext.create("Ext.data.Errors"), c = this.validations, e = Ext.data.validations, b, d, h, a, g, f;
		if (c) {
			b = c.length;
			for (f = 0; f < b; f++) {
				d = c[f];
				h = d.field || d.name;
				g = d.type;
				a = e[g](d, this.get(h));
				if (!a) {
					j.add({
								field : h,
								message : d.message || e[g + "Message"]
							})
				}
			}
		}
		return j
	},
	isValid : function() {
		return this.validate().isValid()
	},
	save : function(c) {
		c = Ext.apply({}, c);
		var e = this, f = e.phantom ? "create" : "update", a = null, d = c.scope
				|| e, b, g;
		Ext.apply(c, {
					records : [e],
					action : f
				});
		b = Ext.create("Ext.data.Operation", c);
		g = function(h) {
			if (h.wasSuccessful()) {
				a = h.getRecords()[0];
				e.set(a.data);
				a.dirty = false;
				Ext.callback(c.success, d, [a, h])
			} else {
				Ext.callback(c.failure, d, [a, h])
			}
			Ext.callback(c.callback, d, [a, h])
		};
		e.getProxy()[f](b, g, e);
		return e
	},
	destroy : function(c) {
		c = Ext.apply({}, c);
		var e = this, a = null, d = c.scope || e, b, f;
		Ext.apply(c, {
					records : [e],
					action : "destroy"
				});
		b = Ext.create("Ext.data.Operation", c);
		f = function(g) {
			if (g.wasSuccessful()) {
				Ext.callback(c.success, d, [a, g])
			} else {
				Ext.callback(c.failure, d, [a, g])
			}
			Ext.callback(c.callback, d, [a, g])
		};
		e.getProxy().destroy(b, f, e);
		return e
	},
	getId : function() {
		return this.get(this.idProperty)
	},
	setId : function(a) {
		this.set(this.idProperty, a)
	},
	join : function(a) {
		this.store = a
	},
	unjoin : function() {
		delete this.store
	},
	afterEdit : function() {
		this.callStore("afterEdit")
	},
	afterReject : function() {
		this.callStore("afterReject")
	},
	afterCommit : function() {
		this.callStore("afterCommit")
	},
	callStore : function(b) {
		var a = this.store;
		if (a !== undefined && typeof a[b] == "function") {
			a[b](this)
		}
	},
	getAssociatedData : function() {
		return this.prepareAssociatedData(this, [], null)
	},
	prepareAssociatedData : function(p, b, o) {
		var k = p.associations.items, m = k.length, f = {}, g, a, h, r, s, e, d, n, l, q, c;
		for (n = 0; n < m; n++) {
			e = k[n];
			q = e.type;
			c = true;
			if (o) {
				c = q == o
			}
			if (c && q == "hasMany") {
				g = p[e.storeName];
				f[e.name] = [];
				if (g && g.data.length > 0) {
					h = g.data.items;
					s = h.length;
					for (l = 0; l < s; l++) {
						r = h[l];
						d = r.id;
						if (Ext.Array.indexOf(b, d) == -1) {
							b.push(d);
							f[e.name][l] = r.data;
							Ext.apply(f[e.name][l], this.prepareAssociatedData(
											r, b, q))
						}
					}
				}
			} else {
				if (c && q == "belongsTo") {
					r = p[e.instanceName];
					if (r !== undefined) {
						d = r.id;
						if (Ext.Array.indexOf(b, d) == -1) {
							b.push(d);
							f[e.name] = r.data;
							Ext.apply(f[e.name], this.prepareAssociatedData(r,
											b, q))
						}
					}
				}
			}
		}
		return f
	}
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.ShortcutModel", {
			extend : "Ext.data.Model",
			fields : [{
						name : "name"
					}, {
						name : "iconCls"
					}, {
						name : "module"
					}]
		});
Ext.define("Ext.data.Store", {
	extend : "Ext.data.AbstractStore",
	alias : "store.store",
	requires : ["Ext.ModelManager", "Ext.data.Model", "Ext.util.Grouper"],
	uses : ["Ext.data.proxy.Memory"],
	remoteSort : false,
	remoteFilter : false,
	remoteGroup : false,
	groupField : undefined,
	groupDir : "ASC",
	pageSize : 25,
	currentPage : 1,
	clearOnPageLoad : true,
	loading : false,
	sortOnFilter : true,
	buffered : false,
	purgePageCount : 5,
	isStore : true,
	constructor : function(a) {
		a = a || {};
		var c = this, e = a.groupers, b, d;
		if (a.buffered || c.buffered) {
			c.prefetchData = Ext.create("Ext.util.MixedCollection", false,
					function(f) {
						return f.index
					});
			c.pendingRequests = [];
			c.pagesRequested = [];
			c.sortOnLoad = false;
			c.filterOnLoad = false
		}
		c.addEvents("beforeprefetch", "groupchange", "prefetch");
		d = a.data || c.data;
		c.data = Ext.create("Ext.util.MixedCollection", false, function(f) {
					return f.internalId
				});
		if (d) {
			c.inlineData = d;
			delete a.data
		}
		if (!e && a.groupField) {
			e = [{
						property : a.groupField,
						direction : a.groupDir
					}]
		}
		delete a.groupers;
		c.groupers = Ext.create("Ext.util.MixedCollection");
		c.groupers.addAll(c.decodeGroupers(e));
		this.callParent([a]);
		if (c.groupers.items.length) {
			c.sort(c.groupers.items, "prepend", false)
		}
		b = c.proxy;
		d = c.inlineData;
		if (d) {
			if (b instanceof Ext.data.proxy.Memory) {
				b.data = d;
				c.read()
			} else {
				c.add.apply(c, d)
			}
			c.sort();
			delete c.inlineData
		} else {
			if (c.autoLoad) {
				Ext.defer(c.load, 10, c, [typeof c.autoLoad === "object"
								? c.autoLoad
								: undefined])
			}
		}
	},
	onBeforeSort : function() {
		this.sort(this.groupers.items, "prepend", false)
	},
	decodeGroupers : function(d) {
		if (!Ext.isArray(d)) {
			if (d === undefined) {
				d = []
			} else {
				d = [d]
			}
		}
		var c = d.length, e = Ext.util.Grouper, a, b;
		for (b = 0; b < c; b++) {
			a = d[b];
			if (!(a instanceof e)) {
				if (Ext.isString(a)) {
					a = {
						property : a
					}
				}
				Ext.applyIf(a, {
							root : "data",
							direction : "ASC"
						});
				if (a.fn) {
					a.sorterFn = a.fn
				}
				if (typeof a == "function") {
					a = {
						sorterFn : a
					}
				}
				d[b] = new e(a)
			}
		}
		return d
	},
	group : function(d, e) {
		var c = this, b, a;
		if (Ext.isArray(d)) {
			a = d
		} else {
			if (Ext.isObject(d)) {
				a = [d]
			} else {
				if (Ext.isString(d)) {
					b = c.groupers.get(d);
					if (!b) {
						b = {
							property : d,
							direction : e
						};
						a = [b]
					} else {
						if (e === undefined) {
							b.toggle()
						} else {
							b.setDirection(e)
						}
					}
				}
			}
		}
		if (a && a.length) {
			a = c.decodeGroupers(a);
			c.groupers.clear();
			c.groupers.addAll(a)
		}
		if (c.remoteGroup) {
			c.load({
						scope : c,
						callback : c.fireGroupChange
					})
		} else {
			c.sort();
			c.fireEvent("groupchange", c, c.groupers)
		}
	},
	clearGrouping : function() {
		var a = this;
		a.groupers.each(function(b) {
					a.sorters.remove(b)
				});
		a.groupers.clear();
		if (a.remoteGroup) {
			a.load({
						scope : a,
						callback : a.fireGroupChange
					})
		} else {
			a.sort();
			a.fireEvent("groupchange", a, a.groupers)
		}
	},
	isGrouped : function() {
		return this.groupers.getCount() > 0
	},
	fireGroupChange : function() {
		this.fireEvent("groupchange", this, this.groupers)
	},
	getGroups : function(b) {
		var d = this.data.items, a = d.length, c = [], j = {}, f, g, h, e;
		for (e = 0; e < a; e++) {
			f = d[e];
			g = this.getGroupString(f);
			h = j[g];
			if (h === undefined) {
				h = {
					name : g,
					children : []
				};
				c.push(h);
				j[g] = h
			}
			h.children.push(f)
		}
		return b ? j[b] : c
	},
	getGroupsForGrouper : function(f, b) {
		var d = f.length, e = [], a, c, h, j, g;
		for (g = 0; g < d; g++) {
			h = f[g];
			c = b.getGroupString(h);
			if (c !== a) {
				j = {
					name : c,
					grouper : b,
					records : []
				};
				e.push(j)
			}
			j.records.push(h);
			a = c
		}
		return e
	},
	getGroupsForGrouperIndex : function(c, h) {
		var f = this, g = f.groupers, b = g.getAt(h), a = f
				.getGroupsForGrouper(c, b), e = a.length, d;
		if (h + 1 < g.length) {
			for (d = 0; d < e; d++) {
				a[d].children = f.getGroupsForGrouperIndex(a[d].records, h + 1)
			}
		}
		for (d = 0; d < e; d++) {
			a[d].depth = h
		}
		return a
	},
	getGroupData : function(a) {
		var b = this;
		if (a !== false) {
			b.sort()
		}
		return b.getGroupsForGrouperIndex(b.data.items, 0)
	},
	getGroupString : function(a) {
		var b = this.groupers.first();
		if (b) {
			return a.get(b.property)
		}
		return ""
	},
	insert : function(d, c) {
		var g = this, f = false, e, b, a;
		c = [].concat(c);
		for (e = 0, a = c.length; e < a; e++) {
			b = g.createModel(c[e]);
			b.set(g.modelDefaults);
			c[e] = b;
			g.data.insert(d + e, b);
			b.join(g);
			f = f || b.phantom === true
		}
		if (g.snapshot) {
			g.snapshot.addAll(c)
		}
		g.fireEvent("add", g, c, d);
		g.fireEvent("datachanged", g);
		if (g.autoSync && f) {
			g.sync()
		}
	},
	add : function(b) {
		if (!Ext.isArray(b)) {
			b = Array.prototype.slice.apply(arguments)
		}
		var e = this, c = 0, d = b.length, a;
		for (; c < d; c++) {
			a = e.createModel(b[c]);
			b[c] = a
		}
		e.insert(e.data.length, b);
		return b
	},
	createModel : function(a) {
		if (!a.isModel) {
			a = Ext.ModelManager.create(a, this.model)
		}
		return a
	},
	each : function(b, a) {
		this.data.each(b, a)
	},
	remove : function(b, j) {
		if (!Ext.isArray(b)) {
			b = [b]
		}
		j = j === true;
		var f = this, g = false, c = 0, a = b.length, h, e, d;
		for (; c < a; c++) {
			d = b[c];
			e = f.data.indexOf(d);
			if (f.snapshot) {
				f.snapshot.remove(d)
			}
			if (e > -1) {
				h = d.phantom === true;
				if (!j && !h) {
					f.removed.push(d)
				}
				d.unjoin(f);
				f.data.remove(d);
				g = g || !h;
				f.fireEvent("remove", f, d, e)
			}
		}
		f.fireEvent("datachanged", f);
		if (!j && f.autoSync && g) {
			f.sync()
		}
	},
	removeAt : function(b) {
		var a = this.getAt(b);
		if (a) {
			this.remove(a)
		}
	},
	load : function(a) {
		var b = this;
		a = a || {};
		if (Ext.isFunction(a)) {
			a = {
				callback : a
			}
		}
		Ext.applyIf(a, {
					groupers : b.groupers.items,
					page : b.currentPage,
					start : (b.currentPage - 1) * b.pageSize,
					limit : b.pageSize,
					addRecords : false
				});
		return b.callParent([a])
	},
	onProxyLoad : function(b) {
		var d = this, c = b.getResultSet(), a = b.getRecords(), e = b
				.wasSuccessful();
		if (c) {
			d.totalCount = c.total
		}
		if (e) {
			d.loadRecords(a, b)
		}
		d.loading = false;
		d.fireEvent("load", d, a, e);
		d.fireEvent("read", d, a, b.wasSuccessful());
		Ext.callback(b.callback, b.scope || d, [a, b, e])
	},
	onCreateRecords : function(d, e, l) {
		if (l) {
			var g = 0, f = this.data, a = this.snapshot, b = d.length, k = e.records, h, c, j;
			for (; g < b; ++g) {
				h = d[g];
				c = k[g];
				if (c) {
					j = f.indexOf(c);
					if (j > -1) {
						f.removeAt(j);
						f.insert(j, h)
					}
					if (a) {
						j = a.indexOf(c);
						if (j > -1) {
							a.removeAt(j);
							a.insert(j, h)
						}
					}
					h.phantom = false;
					h.join(this)
				}
			}
		}
	},
	onUpdateRecords : function(d, c, h) {
		if (h) {
			var e = 0, f = d.length, g = this.data, b = this.snapshot, a;
			for (; e < f; ++e) {
				a = d[e];
				g.replace(a);
				if (b) {
					b.replace(a)
				}
				a.join(this)
			}
		}
	},
	onDestroyRecords : function(c, d, j) {
		if (j) {
			var h = this, f = 0, b = c.length, e = h.data, a = h.snapshot, g;
			for (; f < b; ++f) {
				g = c[f];
				g.unjoin(h);
				e.remove(g);
				if (a) {
					a.remove(g)
				}
			}
			h.removed = []
		}
	},
	getNewRecords : function() {
		return this.data.filterBy(this.filterNew).items
	},
	getUpdatedRecords : function() {
		return this.data.filterBy(this.filterUpdated).items
	},
	filter : function(e, f) {
		if (Ext.isString(e)) {
			e = {
				property : e,
				value : f
			}
		}
		var d = this, a = d.decodeFilters(e), b = 0, g = d.sortOnFilter
				&& !d.remoteSort, c = a.length;
		for (; b < c; b++) {
			d.filters.replace(a[b])
		}
		if (d.remoteFilter) {
			d.load()
		} else {
			if (d.filters.getCount()) {
				d.snapshot = d.snapshot || d.data.clone();
				d.data = d.data.filter(d.filters.items);
				if (g) {
					d.sort()
				}
				if (!g || d.sorters.length < 1) {
					d.fireEvent("datachanged", d)
				}
			}
		}
	},
	clearFilter : function(a) {
		var b = this;
		b.filters.clear();
		if (b.remoteFilter) {
			b.load()
		} else {
			if (b.isFiltered()) {
				b.data = b.snapshot.clone();
				delete b.snapshot;
				if (a !== true) {
					b.fireEvent("datachanged", b)
				}
			}
		}
	},
	isFiltered : function() {
		var a = this.snapshot;
		return !!a && a !== this.data
	},
	filterBy : function(b, a) {
		var c = this;
		c.snapshot = c.snapshot || c.data.clone();
		c.data = c.queryBy(b, a || c);
		c.fireEvent("datachanged", c)
	},
	queryBy : function(b, a) {
		var c = this, d = c.snapshot || c.data;
		return d.filterBy(b, a || c)
	},
	loadData : function(f, a) {
		var c = this.model, e = f.length, d, b;
		for (d = 0; d < e; d++) {
			b = f[d];
			if (!(b instanceof Ext.data.Model)) {
				f[d] = Ext.ModelManager.create(b, c)
			}
		}
		this.loadRecords(f, {
					addRecords : a
				})
	},
	loadRecords : function(a, b) {
		var e = this, c = 0, d = a.length;
		b = b || {};
		if (!b.addRecords) {
			delete e.snapshot;
			e.data.clear()
		}
		e.data.addAll(a);
		for (; c < d; c++) {
			if (b.start !== undefined) {
				a[c].index = b.start + c
			}
			a[c].join(e)
		}
		e.suspendEvents();
		if (e.filterOnLoad && !e.remoteFilter) {
			e.filter()
		}
		if (e.sortOnLoad && !e.remoteSort) {
			e.sort()
		}
		e.resumeEvents();
		e.fireEvent("datachanged", e, a)
	},
	loadPage : function(b) {
		var a = this;
		a.currentPage = b;
		a.read({
					page : b,
					start : (b - 1) * a.pageSize,
					limit : a.pageSize,
					addRecords : !a.clearOnPageLoad
				})
	},
	nextPage : function() {
		this.loadPage(this.currentPage + 1)
	},
	previousPage : function() {
		this.loadPage(this.currentPage - 1)
	},
	clearData : function() {
		this.data.each(function(a) {
					a.unjoin()
				});
		this.data.clear()
	},
	prefetch : function(b) {
		var c = this, a, d = c.getRequestId();
		b = b || {};
		Ext.applyIf(b, {
					action : "read",
					filters : c.filters.items,
					sorters : c.sorters.items,
					requestId : d
				});
		c.pendingRequests.push(d);
		a = Ext.create("Ext.data.Operation", b);
		if (c.fireEvent("beforeprefetch", c, a) !== false) {
			c.loading = true;
			c.proxy.read(a, c.onProxyPrefetch, c)
		}
		return c
	},
	prefetchPage : function(e, c) {
		var d = this, b = d.pageSize, f = (e - 1) * d.pageSize, a = f + b;
		if (Ext.Array.indexOf(d.pagesRequested, e) === -1
				&& !d.rangeSatisfied(f, a)) {
			c = c || {};
			d.pagesRequested.push(e);
			Ext.applyIf(c, {
						page : e,
						start : f,
						limit : b,
						callback : d.onWaitForGuarantee,
						scope : d
					});
			d.prefetch(c)
		}
	},
	getRequestId : function() {
		this.requestSeed = this.requestSeed || 1;
		return this.requestSeed++
	},
	onProxyPrefetch : function(b) {
		var d = this, c = b.getResultSet(), a = b.getRecords(), e = b
				.wasSuccessful();
		if (c) {
			d.totalCount = c.total;
			d.fireEvent("totalcountchange", d.totalCount)
		}
		if (e) {
			d.cacheRecords(a, b)
		}
		Ext.Array.remove(d.pendingRequests, b.requestId);
		if (b.page) {
			Ext.Array.remove(d.pagesRequested, b.page)
		}
		d.loading = false;
		d.fireEvent("prefetch", d, a, e, b);
		if (b.blocking) {
			d.fireEvent("load", d, a, e)
		}
		Ext.callback(b.callback, b.scope || d, [a, b, e])
	},
	cacheRecords : function(b, a) {
		var e = this, c = 0, d = b.length, f = a ? a.start : 0;
		if (!Ext.isDefined(e.totalCount)) {
			e.totalCount = b.length;
			e.fireEvent("totalcountchange", e.totalCount)
		}
		for (; c < d; c++) {
			b[c].index = f + c
		}
		e.prefetchData.addAll(b);
		if (e.purgePageCount) {
			e.purgeRecords()
		}
	},
	purgeRecords : function() {
		var c = this, b = c.prefetchData.getCount(), d = c.purgePageCount
				* c.pageSize, e = b - d - 1, a = 0;
		for (; a <= e; a++) {
			c.prefetchData.removeAt(0)
		}
	},
	rangeSatisfied : function(e, a) {
		var c = this, b = e, d = true;
		for (; b < a; b++) {
			if (!c.prefetchData.getByKey(b)) {
				d = false;
				break
			}
		}
		return d
	},
	getPageFromRecordIndex : function(a) {
		return Math.floor(a / this.pageSize) + 1
	},
	onGuaranteedRange : function() {
		var f = this, c = f.getTotalCount(), g = f.requestStart, b = ((c - 1) < f.requestEnd)
				? c - 1
				: f.requestEnd, d = [], a, e = g;
		if (g !== f.guaranteedStart && b !== f.guaranteedEnd) {
			f.guaranteedStart = g;
			f.guaranteedEnd = b;
			for (; e <= b; e++) {
				a = f.prefetchData.getByKey(e);
				d.push(a)
			}
			f.fireEvent("guaranteedrange", d, g, b);
			if (f.cb) {
				f.cb.call(f.scope || f, d)
			}
		}
		f.unmask()
	},
	mask : function() {
		this.masked = true;
		this.fireEvent("beforeload")
	},
	unmask : function() {
		if (this.masked) {
			this.fireEvent("load")
		}
	},
	hasPendingRequests : function() {
		return this.pendingRequests.length
	},
	onWaitForGuarantee : function() {
		if (!this.hasPendingRequests()) {
			this.onGuaranteedRange()
		}
	},
	guaranteeRange : function(a, c, b, m) {
		c = (c > this.totalCount) ? this.totalCount - 1 : c;
		var h = this, d = a, k = h.prefetchData, e = [], g = !!k.getByKey(a), j = !!k
				.getByKey(c), f = h.getPageFromRecordIndex(a), l = h
				.getPageFromRecordIndex(c);
		h.cb = b;
		h.scope = m;
		h.requestStart = a;
		h.requestEnd = c;
		if (!g || !j) {
			if (f === l) {
				h.mask();
				h.prefetchPage(f, {
							callback : h.onWaitForGuarantee,
							scope : h
						})
			} else {
				h.mask();
				h.prefetchPage(f, {
							callback : h.onWaitForGuarantee,
							scope : h
						});
				h.prefetchPage(l, {
							callback : h.onWaitForGuarantee,
							scope : h
						})
			}
		} else {
			h.onGuaranteedRange()
		}
	},
	sort : function() {
		var d = this, c = d.prefetchData, e, f, a, b;
		if (d.buffered) {
			if (d.remoteSort) {
				c.clear();
				d.callParent(arguments)
			} else {
				e = d.getSorters();
				f = d.guaranteedStart;
				a = d.guaranteedEnd;
				b;
				if (e.length) {
					c.sort(e);
					b = c.getRange();
					c.clear();
					d.cacheRecords(b);
					delete d.guaranteedStart;
					delete d.guaranteedEnd;
					d.guaranteeRange(f, a)
				}
				d.callParent(arguments)
			}
		} else {
			d.callParent(arguments)
		}
	},
	doSort : function(b) {
		var e = this;
		if (e.remoteSort) {
			e.load()
		} else {
			e.data.sortBy(b);
			if (!e.buffered) {
				var a = e.getRange(), d = a.length, c = 0;
				for (; c < d; c++) {
					a[c].index = c
				}
			}
			e.fireEvent("datachanged", e)
		}
	},
	find : function(e, d, g, f, a, c) {
		var b = this.createFilterFn(e, d, f, a, c);
		return b ? this.data.findIndexBy(b, null, g) : -1
	},
	findRecord : function() {
		var b = this, a = b.find.apply(b, arguments);
		return a !== -1 ? b.getAt(a) : null
	},
	createFilterFn : function(d, c, e, a, b) {
		if (Ext.isEmpty(c)) {
			return false
		}
		c = this.data.createValueMatcher(c, e, a, b);
		return function(f) {
			return c.test(f.data[d])
		}
	},
	findExact : function(b, a, c) {
		return this.data.findIndexBy(function(d) {
					return d.get(b) === a
				}, this, c)
	},
	findBy : function(b, a, c) {
		return this.data.findIndexBy(b, a, c)
	},
	collect : function(b, a, c) {
		var d = this, e = (c === true && d.snapshot) ? d.snapshot : d.data;
		return e.collect(b, "data", a)
	},
	getCount : function() {
		return this.data.length || 0
	},
	getTotalCount : function() {
		return this.totalCount
	},
	getAt : function(a) {
		return this.data.getAt(a)
	},
	getRange : function(b, a) {
		return this.data.getRange(b, a)
	},
	getById : function(a) {
		return (this.snapshot || this.data).findBy(function(b) {
					return b.getId() === a
				})
	},
	indexOf : function(a) {
		return this.data.indexOf(a)
	},
	indexOfTotal : function(a) {
		return a.index || this.indexOf(a)
	},
	indexOfId : function(a) {
		return this.data.indexOfKey(a)
	},
	removeAll : function(a) {
		var b = this;
		b.clearData();
		if (b.snapshot) {
			b.snapshot.clear()
		}
		if (a !== true) {
			b.fireEvent("clear", b)
		}
	},
	first : function(a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(function(c) {
						return c.length ? c[0] : undefined
					}, b, true)
		} else {
			return b.data.first()
		}
	},
	last : function(a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(function(d) {
						var c = d.length;
						return c ? d[c - 1] : undefined
					}, b, true)
		} else {
			return b.data.last()
		}
	},
	sum : function(c, a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(b.getSum, b, true, [c])
		} else {
			return b.getSum(b.data.items, c)
		}
	},
	getSum : function(b, e) {
		var d = 0, c = 0, a = b.length;
		for (; c < a; ++c) {
			d += b[c].get(e)
		}
		return d
	},
	count : function(a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(function(c) {
						return c.length
					}, b, true)
		} else {
			return b.getCount()
		}
	},
	min : function(c, a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(b.getMin, b, true, [c])
		} else {
			return b.getMin(b.data.items, c)
		}
	},
	getMin : function(b, f) {
		var d = 1, a = b.length, e, c;
		if (a > 0) {
			c = b[0].get(f)
		}
		for (; d < a; ++d) {
			e = b[d].get(f);
			if (e < c) {
				c = e
			}
		}
		return c
	},
	max : function(c, a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(b.getMax, b, true, [c])
		} else {
			return b.getMax(b.data.items, c)
		}
	},
	getMax : function(c, f) {
		var d = 1, b = c.length, e, a;
		if (b > 0) {
			a = c[0].get(f)
		}
		for (; d < b; ++d) {
			e = c[d].get(f);
			if (e > a) {
				a = e
			}
		}
		return a
	},
	average : function(c, a) {
		var b = this;
		if (a && b.isGrouped()) {
			return b.aggregate(b.getAverage, b, true, [c])
		} else {
			return b.getAverage(b.data.items, c)
		}
	},
	getAverage : function(b, e) {
		var c = 0, a = b.length, d = 0;
		if (b.length > 0) {
			for (; c < a; ++c) {
				d += b[c].get(e)
			}
			return d / a
		}
		return 0
	},
	aggregate : function(g, j, e, f) {
		f = f || [];
		if (e && this.isGrouped()) {
			var a = this.getGroups(), c = 0, d = a.length, b = {}, h;
			for (; c < d; ++c) {
				h = a[c];
				b[h.name] = g.apply(j || this, [h.children].concat(f))
			}
			return b
		} else {
			return g.apply(j || this, [this.data.items].concat(f))
		}
	}
});
Ext.define("Ext.data.ArrayStore", {
			extend : "Ext.data.Store",
			alias : "store.array",
			uses : ["Ext.data.reader.Array"],
			constructor : function(a) {
				a = a || {};
				Ext.applyIf(a, {
							proxy : {
								type : "memory",
								reader : "array"
							}
						});
				this.callParent([a])
			},
			loadData : function(e, a) {
				if (this.expandData === true) {
					var d = [], b = 0, c = e.length;
					for (; b < c; b++) {
						d[d.length] = [e[b]]
					}
					e = d
				}
				this.callParent([e, a])
			}
		}, function() {
			Ext.data.SimpleStore = Ext.data.ArrayStore
		});
Ext.define("Ext.data.JsonStore", {
			extend : "Ext.data.Store",
			alias : "store.json",
			constructor : function(a) {
				a = a || {};
				Ext.applyIf(a, {
							proxy : {
								type : "ajax",
								reader : "json",
								writer : "json"
							}
						});
				this.callParent([a])
			}
		});
Ext.define("Ext.chart.axis.Time", {
	extend : "Ext.chart.axis.Category",
	alternateClassName : "Ext.chart.TimeAxis",
	alias : "axis.time",
	requires : ["Ext.data.Store", "Ext.data.JsonStore"],
	calculateByLabelSize : true,
	dateFormat : false,
	groupBy : "year,month,day",
	aggregateOp : "sum",
	fromDate : false,
	toDate : false,
	step : [Ext.Date.DAY, 1],
	constrain : false,
	dateMethods : {
		year : function(a) {
			return a.getFullYear()
		},
		month : function(a) {
			return a.getMonth() + 1
		},
		day : function(a) {
			return a.getDate()
		},
		hour : function(a) {
			return a.getHours()
		},
		minute : function(a) {
			return a.getMinutes()
		},
		second : function(a) {
			return a.getSeconds()
		},
		millisecond : function(a) {
			return a.getMilliseconds()
		}
	},
	aggregateFn : (function() {
		var a = (function() {
			var b = /^\[object\s(.*)\]$/, c = Object.prototype.toString;
			return function(d) {
				return c.call(d).match(b)[1]
			}
		})();
		return {
			sum : function(d) {
				var c = 0, b = d.length, e = 0;
				if (!d.length || a(d[0]) != "Number") {
					return d[0]
				}
				for (; c < b; c++) {
					e += d[c]
				}
				return e
			},
			max : function(b) {
				if (!b.length || a(b[0]) != "Number") {
					return b[0]
				}
				return Math.max.apply(Math, b)
			},
			min : function(b) {
				if (!b.length || a(b[0]) != "Number") {
					return b[0]
				}
				return Math.min.apply(Math, b)
			},
			avg : function(d) {
				var c = 0, b = d.length, e = 0;
				if (!d.length || a(d[0]) != "Number") {
					return d[0]
				}
				for (; c < b; c++) {
					e += d[c]
				}
				return e / b
			}
		}
	})(),
	constrainDates : function() {
		var e = Ext.Date.clone(this.fromDate), d = Ext.Date.clone(this.toDate), b = this.step, f = this.fields, h = this.chart.store, c, g, j = [], a = Ext
				.create("Ext.data.Store", {
							model : h.model
						});
		var i = (function() {
			var m = 0, k = h.getCount();
			return function(n) {
				var o, l;
				for (; m < k; m++) {
					o = h.getAt(m);
					l = o.get(f);
					if (+l > +n) {
						return false
					} else {
						if (+l == +n) {
							return o
						}
					}
				}
				return false
			}
		})();
		if (!this.constrain) {
			this.chart.filteredStore = this.chart.store;
			return
		}
		while (+e <= +d) {
			c = i(e);
			g = {};
			if (c) {
				a.add(c.data)
			} else {
				a.model.prototype.fields.each(function(k) {
							g[k.name] = false
						});
				g.date = e;
				a.add(g)
			}
			e = Ext.Date.add(e, b[0], b[1])
		}
		this.chart.filteredStore = a
	},
	aggregate : function() {
		var r = {}, n = [], t, m, h = this.aggregateOp, a = this.fields, p, k = this.groupBy
				.split(","), c, s = [], d = 0, j, e = [], q = [], o = k.length, b = this.dateMethods, g = this.aggregateFn, f = this.chart.filteredStore
				|| this.chart.store;
		f.each(function(i) {
					if (!s.length) {
						i.fields.each(function(l) {
									s.push(l.name)
								});
						d = s.length
					}
					m = i.get(a);
					for (p = 0; p < o; p++) {
						if (p == 0) {
							t = String(b[k[p]](m))
						} else {
							t += "||" + b[k[p]](m)
						}
					}
					if (t in r) {
						j = r[t]
					} else {
						j = r[t] = {};
						n.push(t);
						e.push(m)
					}
					for (p = 0; p < d; p++) {
						c = s[p];
						if (!j[c]) {
							j[c] = []
						}
						if (i.get(c) !== undefined) {
							j[c].push(i.get(c))
						}
					}
				});
		for (t in r) {
			j = r[t];
			for (p = 0; p < d; p++) {
				c = s[p];
				j[c] = g[h](j[c])
			}
			q.push(j)
		}
		this.chart.substore = Ext.create("Ext.data.JsonStore", {
					fields : s,
					data : q
				});
		this.dates = e
	},
	setLabels : function() {
		var b = this.chart.substore, a = this.fields, f = this.dateFormat, g, d, e = this.dates, c = Ext.Date.format;
		this.labels = g = [];
		b.each(function(h, j) {
					if (!f) {
						g.push(h.get(a))
					} else {
						g.push(c(e[j], f))
					}
				}, this)
	},
	processView : function() {
		if (this.constrain) {
			this.constrainDates();
			this.aggregate();
			this.chart.substore = this.chart.filteredStore
		} else {
			this.aggregate()
		}
	},
	applyData : function() {
		this.setLabels();
		var a = this.chart.substore.getCount();
		return {
			from : 0,
			to : a,
			steps : a - 1,
			step : 1
		}
	}
});
Ext.define("Ext.data.NodeStore", {
			extend : "Ext.data.Store",
			alias : "store.node",
			requires : ["Ext.data.NodeInterface"],
			node : null,
			recursive : false,
			rootVisible : false,
			constructor : function(a) {
				var c = this, b;
				a = a || {};
				Ext.apply(c, a);
				a.proxy = {
					type : "proxy"
				};
				c.callParent([a]);
				c.addEvents("expand", "collapse", "beforeexpand",
						"beforecollapse");
				b = c.node;
				if (b) {
					c.node = null;
					c.setNode(b)
				}
			},
			setNode : function(b) {
				var a = this;
				if (a.node && a.node != b) {
					a.mun(a.node, {
								expand : a.onNodeExpand,
								collapse : a.onNodeCollapse,
								append : a.onNodeAppend,
								insert : a.onNodeInsert,
								remove : a.onNodeRemove,
								sort : a.onNodeSort,
								scope : a
							});
					a.node = null
				}
				if (b) {
					Ext.data.NodeInterface.decorate(b);
					a.removeAll();
					if (a.rootVisible) {
						a.add(b)
					}
					a.mon(b, {
								expand : a.onNodeExpand,
								collapse : a.onNodeCollapse,
								append : a.onNodeAppend,
								insert : a.onNodeInsert,
								remove : a.onNodeRemove,
								sort : a.onNodeSort,
								scope : a
							});
					a.node = b;
					if (b.isExpanded() && b.isLoaded()) {
						a.onNodeExpand(b, b.childNodes, true)
					}
				}
			},
			onNodeSort : function(b, c) {
				var a = this;
				if ((a.indexOf(b) !== -1 || (b === a.node && !a.rootVisible)
						&& b.isExpanded())) {
					a.onNodeCollapse(b, c, true);
					a.onNodeExpand(b, c, true)
				}
			},
			onNodeExpand : function(f, d, c) {
				var h = this, a = h.indexOf(f) + 1, g = d ? d.length : 0, e, b;
				if (!h.recursive && f !== h.node) {
					return
				}
				if (!h.isVisible(f)) {
					return
				}
				if (!c && h.fireEvent("beforeexpand", f, d, a) === false) {
					return
				}
				if (g) {
					h.insert(a, d);
					for (e = 0; e < g; e++) {
						b = d[e];
						if (b.isExpanded()) {
							if (b.isLoaded()) {
								h.onNodeExpand(b, b.childNodes, true)
							} else {
								b.set("expanded", false);
								b.expand()
							}
						}
					}
				}
				if (!c) {
					h.fireEvent("expand", f, d)
				}
			},
			onNodeCollapse : function(f, c, b) {
				var h = this, g = c.length, e = h.indexOf(f) + 1, d, a;
				if (!h.recursive && f !== h.node) {
					return
				}
				if (!b && h.fireEvent("beforecollapse", f, c, e) === false) {
					return
				}
				for (d = 0; d < g; d++) {
					a = c[d];
					h.remove(a);
					if (a.isExpanded()) {
						h.onNodeCollapse(a, a.childNodes, true)
					}
				}
				if (!b) {
					h.fireEvent("collapse", f, c, e)
				}
			},
			onNodeAppend : function(d, f, b) {
				var e = this, a, c;
				if (e.isVisible(f)) {
					if (b === 0) {
						a = d
					} else {
						c = f.previousSibling;
						while (c.isExpanded() && c.lastChild) {
							c = c.lastChild
						}
						a = c
					}
					e.insert(e.indexOf(a) + 1, f);
					if (!f.isLeaf() && f.isExpanded()) {
						if (f.isLoaded()) {
							e.onNodeExpand(f, f.childNodes, true)
						} else {
							f.set("expanded", false);
							f.expand()
						}
					}
				}
			},
			onNodeInsert : function(c, e, a) {
				var d = this, b = this.indexOf(a);
				if (b != -1 && d.isVisible(e)) {
					d.insert(b, e);
					if (!e.isLeaf() && e.isExpanded()) {
						if (e.isLoaded()) {
							d.onNodeExpand(e, e.childNodes, true)
						} else {
							e.set("expanded", false);
							e.expand()
						}
					}
				}
			},
			onNodeRemove : function(b, d, a) {
				var c = this;
				if (c.indexOf(d) != -1) {
					if (!d.isLeaf() && d.isExpanded()) {
						c.onNodeCollapse(d, d.childNodes, true)
					}
					c.remove(d)
				}
			},
			isVisible : function(b) {
				var a = b.parentNode;
				while (a) {
					if (a === this.node && !this.rootVisible && a.isExpanded()) {
						return true
					}
					if (this.indexOf(a) === -1 || !a.isExpanded()) {
						return false
					}
					a = a.parentNode
				}
				return true
			}
		});
Ext.define("Ext.data.TreeStore", {
	extend : "Ext.data.AbstractStore",
	alias : "store.tree",
	requires : ["Ext.data.Tree", "Ext.data.NodeInterface", "Ext.data.NodeStore"],
	clearOnLoad : true,
	nodeParam : "node",
	defaultRootId : "root",
	defaultRootProperty : "children",
	folderSort : false,
	constructor : function(c) {
		var d = this, b, a;
		c = Ext.apply({}, c);
		a = c.fields || d.fields;
		if (!a) {
			c.fields = [{
						name : "text",
						type : "string"
					}]
		}
		d.callParent([c]);
		d.tree = Ext.create("Ext.data.Tree");
		d.tree.on({
					scope : d,
					remove : d.onNodeRemove,
					beforeexpand : d.onBeforeNodeExpand,
					beforecollapse : d.onBeforeNodeCollapse,
					append : d.onNodeAdded,
					insert : d.onNodeAdded
				});
		d.onBeforeSort();
		b = d.root;
		if (b) {
			delete d.root;
			d.setRootNode(b)
		}
		d.relayEvents(d.tree, ["append", "remove", "move", "insert",
						"beforeappend", "beforeremove", "beforemove",
						"beforeinsert", "expand", "collapse", "beforeexpand",
						"beforecollapse", "sort", "rootchange"]);
		d.addEvents("rootchange");
		if (Ext.isDefined(d.nodeParameter)) {
			if (Ext.isDefined(Ext.global.console)) {
				Ext.global.console
						.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")
			}
			d.nodeParam = d.nodeParameter;
			delete d.nodeParameter
		}
	},
	setProxy : function(c) {
		var a, b;
		if (c instanceof Ext.data.proxy.Proxy) {
			b = Ext.isEmpty(c.getReader().root)
		} else {
			if (Ext.isString(c)) {
				b = true
			} else {
				a = c.reader;
				b = !(a && !Ext.isEmpty(a.root))
			}
		}
		c = this.callParent(arguments);
		if (b) {
			a = c.getReader();
			a.root = this.defaultRootProperty;
			a.buildExtractors(true)
		}
	},
	onBeforeSort : function() {
		if (this.folderSort) {
			this.sort({
						property : "leaf",
						direction : "ASC"
					}, "prepend", false)
		}
	},
	onBeforeNodeExpand : function(b, c, a) {
		if (b.isLoaded()) {
			Ext.callback(c, a || b, [b.childNodes])
		} else {
			if (b.isLoading()) {
				this.on("load", function() {
							Ext.callback(c, a || b, [b.childNodes])
						}, this, {
							single : true
						})
			} else {
				this.read({
							node : b,
							callback : function() {
								Ext.callback(c, a || b, [b.childNodes])
							}
						})
			}
		}
	},
	getNewRecords : function() {
		return Ext.Array.filter(this.tree.flatten(), this.filterNew)
	},
	getUpdatedRecords : function() {
		return Ext.Array.filter(this.tree.flatten(), this.filterUpdated)
	},
	onBeforeNodeCollapse : function(b, c, a) {
		c.call(a || b, b.childNodes)
	},
	onNodeRemove : function(a, b) {
		var c = this.removed;
		if (!b.isReplace && Ext.Array.indexOf(c, b) == -1) {
			c.push(b)
		}
	},
	onNodeAdded : function(d, e) {
		var c = this.getProxy(), a = c.getReader(), f = e.raw || e.data, g, b;
		Ext.Array.remove(this.removed, e);
		if (!e.isLeaf() && !e.isLoaded()) {
			g = a.getRoot(f);
			if (g) {
				this.fillNode(e, a.extractData(g));
				delete f[a.root]
			}
		}
	},
	setRootNode : function(a) {
		var b = this;
		a = a || {};
		if (!a.isNode) {
			Ext.applyIf(a, {
						id : b.defaultRootId,
						text : "Root",
						allowDrag : false
					});
			a = Ext.ModelManager.create(a, b.model)
		}
		Ext.data.NodeInterface.decorate(a);
		b.getProxy().getReader().buildExtractors(true);
		b.tree.setRootNode(a);
		if (!a.isLoaded() && a.isExpanded()) {
			b.load({
						node : a
					})
		}
		return a
	},
	getRootNode : function() {
		return this.tree.getRootNode()
	},
	getNodeById : function(a) {
		return this.tree.getNodeById(a)
	},
	load : function(b) {
		b = b || {};
		b.params = b.params || {};
		var d = this, c = b.node || d.tree.getRootNode(), a;
		if (!c) {
			c = d.setRootNode({
						expanded : true
					})
		}
		if (d.clearOnLoad) {
			c.removeAll()
		}
		Ext.applyIf(b, {
					node : c
				});
		b.params[d.nodeParam] = c ? c.getId() : "root";
		if (c) {
			c.set("loading", true)
		}
		return d.callParent([b])
	},
	fillNode : function(f, b) {
		var e = this, d = b ? b.length : 0, c = 0, a;
		if (d && e.sortOnLoad && !e.remoteSort && e.sorters && e.sorters.items) {
			a = Ext.create("Ext.util.MixedCollection");
			a.addAll(b);
			a.sort(e.sorters.items);
			b = a.items
		}
		f.set("loaded", true);
		for (; c < d; c++) {
			f.appendChild(b[c], undefined, true)
		}
		return b
	},
	onProxyLoad : function(b) {
		var d = this, e = b.wasSuccessful(), a = b.getRecords(), c = b.node;
		c.set("loading", false);
		if (e) {
			a = d.fillNode(c, a)
		}
		d.fireEvent("read", d, b.node, a, e);
		d.fireEvent("load", d, b.node, a, e);
		Ext.callback(b.callback, b.scope || d, [a, b, e])
	},
	onCreateRecords : function(c, d, k) {
		if (k) {
			var e = 0, a = c.length, j = d.records, g, f, b, h;
			for (; e < a; ++e) {
				f = c[e];
				b = j[e];
				if (b) {
					g = b.parentNode;
					if (g) {
						b.isReplace = true;
						g.replaceChild(f, b);
						delete b.isReplace
					}
					f.phantom = false
				}
			}
		}
	},
	onUpdateRecords : function(c, d, k) {
		if (k) {
			var j = this, f = 0, a = c.length, e = j.data, b, h, g;
			for (; f < a; ++f) {
				g = c[f];
				b = j.tree.getNodeById(g.getId());
				h = b.parentNode;
				if (h) {
					b.isReplace = true;
					h.replaceChild(g, b);
					b.isReplace = false
				}
			}
		}
	},
	onDestroyRecords : function(b, a, c) {
		if (c) {
			this.removed = []
		}
	},
	removeAll : function() {
		this.getRootNode().destroy();
		this.fireEvent("clear", this)
	},
	doSort : function(a) {
		var b = this;
		if (b.remoteSort) {
			b.load()
		} else {
			b.tree.sort(a, true);
			b.fireEvent("datachanged", b)
		}
		b.fireEvent("sort", b)
	}
});
Ext.define("Ext.selection.DataViewModel", {
			extend : "Ext.selection.Model",
			requires : ["Ext.util.KeyNav"],
			deselectOnContainerClick : true,
			enableKeyNav : true,
			constructor : function(a) {
				this.addEvents("deselect", "select");
				this.callParent(arguments)
			},
			bindComponent : function(a) {
				var b = this, c = {
					refresh : b.refresh,
					scope : b
				};
				b.view = a;
				b.bind(a.getStore());
				a.on(a.triggerEvent, b.onItemClick, b);
				a.on(a.triggerCtEvent, b.onContainerClick, b);
				a.on(c);
				if (b.enableKeyNav) {
					b.initKeyNav(a)
				}
			},
			onItemClick : function(b, a, d, c, f) {
				this.selectWithEvent(a, f)
			},
			onContainerClick : function() {
				if (this.deselectOnContainerClick) {
					this.deselectAll()
				}
			},
			initKeyNav : function(a) {
				var b = this;
				if (!a.rendered) {
					a.on("render", Ext.Function.bind(b.initKeyNav, b, [a], 0),
							b, {
								single : true
							});
					return
				}
				a.el.set({
							tabIndex : -1
						});
				b.keyNav = Ext.create("Ext.util.KeyNav", a.el, {
							down : Ext.pass(b.onNavKey, [1], b),
							right : Ext.pass(b.onNavKey, [1], b),
							left : Ext.pass(b.onNavKey, [-1], b),
							up : Ext.pass(b.onNavKey, [-1], b),
							scope : b
						})
			},
			onNavKey : function(f) {
				f = f || 1;
				var e = this, b = e.view, d = e.getSelection()[0], c = e.view.store
						.getCount(), a;
				if (d) {
					a = b.indexOf(b.getNode(d)) + f
				} else {
					a = 0
				}
				if (a < 0) {
					a = c - 1
				} else {
					if (a >= c) {
						a = 0
					}
				}
				e.select(a)
			},
			onSelectChange : function(b, e, c) {
				var f = this, a = f.view, d = true;
				if (e) {
					if (!c) {
						d = f.fireEvent("beforeselect", f, b) !== false
					}
					if (d) {
						a.onItemSelect(b);
						if (!c) {
							f.fireEvent("select", f, b)
						}
					}
				} else {
					a.onItemDeselect(b);
					if (!c) {
						f.fireEvent("deselect", f, b)
					}
				}
			}
		});
Ext.define("Ext.view.AbstractView", {
			extend : "Ext.Component",
			alternateClassName : "Ext.view.AbstractView",
			requires : ["Ext.LoadMask", "Ext.data.StoreManager",
					"Ext.CompositeElementLite", "Ext.DomQuery",
					"Ext.selection.DataViewModel"],
			inheritableStatics : {
				getRecord : function(a) {
					return this.getBoundView(a).getRecord(a)
				},
				getBoundView : function(a) {
					return Ext.getCmp(a.boundView)
				}
			},
			itemCls : Ext.baseCSSPrefix + "dataview-item",
			loadingText : "Loading...",
			loadingUseMsg : true,
			selectedItemCls : Ext.baseCSSPrefix + "item-selected",
			emptyText : "",
			deferEmptyText : true,
			trackOver : false,
			blockRefresh : false,
			last : false,
			triggerEvent : "itemclick",
			triggerCtEvent : "containerclick",
			addCmpEvents : function() {
			},
			initComponent : function() {
				var c = this, a = Ext.isDefined, d = c.itemTpl, b = {};
				if (d) {
					if (Ext.isArray(d)) {
						d = d.join("")
					} else {
						if (Ext.isObject(d)) {
							b = Ext.apply(b, d.initialConfig);
							d = d.html
						}
					}
					if (!c.itemSelector) {
						c.itemSelector = "." + c.itemCls
					}
					d = Ext.String.format(
							'<tpl for="."><div class="{0}">{1}</div></tpl>',
							c.itemCls, d);
					c.tpl = Ext.create("Ext.XTemplate", d, b)
				}
				c.callParent();
				if (Ext.isString(c.tpl) || Ext.isArray(c.tpl)) {
					c.tpl = Ext.create("Ext.XTemplate", c.tpl)
				}
				c.addEvents("beforerefresh", "refresh", "itemupdate",
						"itemadd", "itemremove");
				c.addCmpEvents();
				if (c.store) {
					c.store = Ext.data.StoreManager.lookup(c.store)
				}
				c.all = new Ext.CompositeElementLite();
				c.getSelectionModel().bindComponent(c)
			},
			onRender : function() {
				var d = this, a = d.loadingText, c = d.loadingHeight, b;
				d.callParent(arguments);
				if (a) {
					d.loadMask = Ext.create("Ext.LoadMask", d.floating
									? d
									: d.ownerCt || d, {
								msg : a,
								msgCls : d.loadingCls,
								useMsg : d.loadingUseMsg,
								listeners : {
									beforeshow : function() {
										d.getTargetEl().update("");
										d.getSelectionModel().deselectAll();
										d.all.clear();
										if (c) {
											d.setCalculatedSize(b, c)
										}
									},
									hide : function() {
										if (c) {
											d.setHeight(d.height)
										}
									}
								}
							})
				}
			},
			getSelectionModel : function() {
				var a = this, b = "SINGLE";
				if (!a.selModel) {
					a.selModel = {}
				}
				if (a.simpleSelect) {
					b = "SIMPLE"
				} else {
					if (a.multiSelect) {
						b = "MULTI"
					}
				}
				Ext.applyIf(a.selModel, {
							allowDeselect : a.allowDeselect,
							mode : b
						});
				if (!a.selModel.events) {
					a.selModel = Ext.create("Ext.selection.DataViewModel",
							a.selModel)
				}
				if (!a.selModel.hasRelaySetup) {
					a.relayEvents(a.selModel, ["selectionchange",
									"beforeselect", "select", "deselect"]);
					a.selModel.hasRelaySetup = true
				}
				if (a.disableSelection) {
					a.selModel.locked = true
				}
				return a.selModel
			},
			refresh : function() {
				var c = this, b, a;
				if (!c.rendered) {
					return
				}
				c.fireEvent("beforerefresh", c);
				b = c.getTargetEl();
				a = c.store.getRange();
				b.update("");
				if (a.length < 1) {
					if (!c.deferEmptyText || c.hasSkippedEmptyText) {
						b.update(c.emptyText)
					}
					c.all.clear()
				} else {
					c.tpl.overwrite(b, c.collectData(a, 0));
					c.all.fill(Ext.query(c.getItemSelector(), b.dom));
					c.updateIndexes(0)
				}
				c.selModel.refresh();
				c.hasSkippedEmptyText = true;
				c.fireEvent("refresh", c)
			},
			prepareData : function(c, b, a) {
				if (a) {
					Ext.apply(c, a.getAssociatedData())
				}
				return c
			},
			collectData : function(b, e) {
				var d = [], c = 0, a = b.length;
				for (; c < a; c++) {
					d[d.length] = this.prepareData(b[c].data, e + c, b[c])
				}
				return d
			},
			bufferRender : function(a, b) {
				var c = document.createElement("div");
				this.tpl.overwrite(c, this.collectData(a, b));
				return Ext.query(this.getItemSelector(), c)
			},
			onUpdate : function(f, a) {
				var e = this, b = e.store.indexOf(a), c, d;
				if (b > -1) {
					c = e.all.elements[b];
					d = e.bufferRender([a], b)[0];
					e.all.replaceElement(b, d, true);
					e.updateIndexes(b, b);
					e.selModel.refresh();
					e.fireEvent("itemupdate", a, b, d)
				}
			},
			onAdd : function(e, b, c) {
				var d = this, a;
				if (d.all.getCount() === 0) {
					d.refresh();
					return
				}
				a = d.bufferRender(b, c);
				d.doAdd(a, b, c);
				d.selModel.refresh();
				d.updateIndexes(c);
				d.fireEvent("itemadd", b, c, a)
			},
			doAdd : function(d, c, e) {
				var f, b = this.all.elements;
				if (e < this.all.getCount()) {
					f = this.all.item(e).insertSibling(d, "before", true);
					b.splice.apply(b, [e, 0].concat(d))
				} else {
					f = this.all.last().insertSibling(d, "after", true);
					b.push.apply(b, d)
				}
			},
			onRemove : function(d, a, b) {
				var c = this;
				c.doRemove(a, b);
				c.updateIndexes(b);
				if (c.store.getCount() === 0) {
					c.refresh()
				}
				c.fireEvent("itemremove", a, b)
			},
			doRemove : function(a, b) {
				this.all.removeElement(b, true)
			},
			refreshNode : function(a) {
				this.onUpdate(this.store, this.store.getAt(a))
			},
			updateIndexes : function(e, d) {
				var c = this.all.elements, a = this.store.getRange();
				e = e || 0;
				d = d || ((d === 0) ? 0 : (c.length - 1));
				for (var b = e; b <= d; b++) {
					c[b].viewIndex = b;
					c[b].viewRecordId = a[b].internalId;
					if (!c[b].boundView) {
						c[b].boundView = this.id
					}
				}
			},
			getStore : function() {
				return this.store
			},
			bindStore : function(a, b) {
				var c = this;
				if (!b && c.store) {
					if (a !== c.store && c.store.autoDestroy) {
						c.store.destroy()
					} else {
						c.mun(c.store, {
									scope : c,
									datachanged : c.onDataChanged,
									add : c.onAdd,
									remove : c.onRemove,
									update : c.onUpdate,
									clear : c.refresh
								})
					}
					if (!a) {
						if (c.loadMask) {
							c.loadMask.bindStore(null)
						}
						c.store = null
					}
				}
				if (a) {
					a = Ext.data.StoreManager.lookup(a);
					c.mon(a, {
								scope : c,
								datachanged : c.onDataChanged,
								add : c.onAdd,
								remove : c.onRemove,
								update : c.onUpdate,
								clear : c.refresh
							});
					if (c.loadMask) {
						c.loadMask.bindStore(a)
					}
				}
				c.store = a;
				c.getSelectionModel().bind(a);
				if (a) {
					c.refresh(true)
				}
			},
			onDataChanged : function() {
				if (this.blockRefresh !== true) {
					this.refresh.apply(this, arguments)
				}
			},
			findItemByChild : function(a) {
				return Ext.fly(a).findParent(this.getItemSelector(),
						this.getTargetEl())
			},
			findTargetByEvent : function(a) {
				return a.getTarget(this.getItemSelector(), this.getTargetEl())
			},
			getSelectedNodes : function() {
				var b = [], a = this.selModel.getSelection(), d = a.length, c = 0;
				for (; c < d; c++) {
					b.push(this.getNode(a[c]))
				}
				return b
			},
			getRecords : function(c) {
				var b = [], d = 0, a = c.length, e = this.store.data;
				for (; d < a; d++) {
					b[b.length] = e.getByKey(c[d].viewRecordId)
				}
				return b
			},
			getRecord : function(a) {
				return this.store.data.getByKey(Ext.getDom(a).viewRecordId)
			},
			isSelected : function(b) {
				var a = this.getRecord(b);
				return this.selModel.isSelected(a)
			},
			select : function(b, c, a) {
				this.selModel.select(b, c, a)
			},
			deselect : function(b, a) {
				this.selModel.deselect(b, a)
			},
			getNode : function(a) {
				if (Ext.isString(a)) {
					return document.getElementById(a)
				} else {
					if (Ext.isNumber(a)) {
						return this.all.elements[a]
					} else {
						if (a instanceof Ext.data.Model) {
							return this.getNodeByRecord(a)
						}
					}
				}
				return a
			},
			getNodeByRecord : function(a) {
				var c = this.all.elements, d = c.length, b = 0;
				for (; b < d; b++) {
					if (c[b].viewRecordId === a.internalId) {
						return c[b]
					}
				}
				return null
			},
			getNodes : function(e, a) {
				var d = this.all.elements, b = [], c;
				e = e || 0;
				a = !Ext.isDefined(a) ? Math.max(d.length - 1, 0) : a;
				if (e <= a) {
					for (c = e; c <= a && d[c]; c++) {
						b.push(d[c])
					}
				} else {
					for (c = e; c >= a && d[c]; c--) {
						b.push(d[c])
					}
				}
				return b
			},
			indexOf : function(a) {
				a = this.getNode(a);
				if (Ext.isNumber(a.viewIndex)) {
					return a.viewIndex
				}
				return this.all.indexOf(a)
			},
			onDestroy : function() {
				var a = this;
				a.all.clear();
				a.callParent();
				a.bindStore(null);
				a.selModel.destroy()
			},
			onItemSelect : function(a) {
				var b = this.getNode(a);
				Ext.fly(b).addCls(this.selectedItemCls)
			},
			onItemDeselect : function(a) {
				var b = this.getNode(a);
				Ext.fly(b).removeCls(this.selectedItemCls)
			},
			getItemSelector : function() {
				return this.itemSelector
			}
		}, function() {
			Ext.deprecate("extjs", "4.0", function() {
				Ext.view.AbstractView.override({
					getSelectionCount : function() {
						console
								.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel");
						return this.selModel.getSelection().length
					},
					getSelectedRecords : function() {
						console
								.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel");
						return this.selModel.getSelection()
					},
					select : function(a, b, d) {
						console
								.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()");
						var c = this.getSelectionModel();
						return c.select.apply(c, arguments)
					},
					clearSelections : function() {
						console
								.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()");
						var a = this.getSelectionModel();
						return a.deselectAll()
					}
				})
			})
		});
Ext.define("Ext.view.View", {
	extend : "Ext.view.AbstractView",
	alternateClassName : "Ext.view.View",
	alias : "widget.dataview",
	inheritableStatics : {
		EventMap : {
			mousedown : "MouseDown",
			mouseup : "MouseUp",
			click : "Click",
			dblclick : "DblClick",
			contextmenu : "ContextMenu",
			mouseover : "MouseOver",
			mouseout : "MouseOut",
			mouseenter : "MouseEnter",
			mouseleave : "MouseLeave",
			keydown : "KeyDown"
		}
	},
	addCmpEvents : function() {
		this.addEvents("beforeitemmousedown", "beforeitemmouseup",
				"beforeitemmouseenter", "beforeitemmouseleave",
				"beforeitemclick", "beforeitemdblclick",
				"beforeitemcontextmenu", "beforeitemkeydown", "itemmousedown",
				"itemmouseup", "itemmouseenter", "itemmouseleave", "itemclick",
				"itemdblclick", "itemcontextmenu", "itemkeydown",
				"beforecontainermousedown", "beforecontainermouseup",
				"beforecontainermouseover", "beforecontainermouseout",
				"beforecontainerclick", "beforecontainerdblclick",
				"beforecontainercontextmenu", "beforecontainerkeydown",
				"containermouseup", "containermouseover", "containermouseout",
				"containerclick", "containerdblclick", "containercontextmenu",
				"containerkeydown", "selectionchange", "beforeselect")
	},
	afterRender : function() {
		var b = this, a;
		b.callParent();
		a = {
			scope : b,
			click : b.handleEvent,
			mousedown : b.handleEvent,
			mouseup : b.handleEvent,
			dblclick : b.handleEvent,
			contextmenu : b.handleEvent,
			mouseover : b.handleEvent,
			mouseout : b.handleEvent,
			keydown : b.handleEvent
		};
		b.mon(b.getTargetEl(), a);
		if (b.store) {
			b.bindStore(b.store, true)
		}
	},
	handleEvent : function(a) {
		if (this.processUIEvent(a) !== false) {
			this.processSpecialEvent(a)
		}
	},
	processItemEvent : Ext.emptyFn,
	processContainerEvent : Ext.emptyFn,
	processSpecialEvent : Ext.emptyFn,
	processUIEvent : function(h, c) {
		c = c || h.type;
		var f = this, d = h.getTarget(f.getItemSelector(), f.getTargetEl()), g = this
				.statics().EventMap, b, a;
		if (!d) {
			if (c == "mouseover"
					&& f.mouseOverItem
					&& typeof f.mouseOverItem.offsetParent === "object"
					&& Ext.fly(f.mouseOverItem).getRegion().contains(h
							.getPoint())) {
				d = f.mouseOverItem
			}
			if (c == "keydown") {
				a = f.getSelectionModel().getLastSelected();
				if (a) {
					d = f.getNode(a)
				}
			}
		}
		if (d) {
			b = f.indexOf(d);
			if (!a) {
				a = f.getRecord(d)
			}
			if (f.processItemEvent(c, a, d, b, h) === false) {
				return false
			}
			c = f.isNewItemEvent(c, d, h);
			if (c === false) {
				return false
			}
			if ((f["onBeforeItem" + g[c]](a, d, b, h) === false)
					|| (f.fireEvent("beforeitem" + c, f, a, d, b, h) === false)
					|| (f["onItem" + g[c]](a, d, b, h) === false)) {
				return false
			}
			f.fireEvent("item" + c, f, a, d, b, h)
		} else {
			if ((f.processContainerEvent(c, h) === false)
					|| (f["onBeforeContainer" + g[c]](h) === false)
					|| (f.fireEvent("beforecontainer" + c, f, h) === false)
					|| (f["onContainer" + g[c]](h) === false)) {
				return false
			}
			f.fireEvent("container" + c, f, h)
		}
		return true
	},
	isNewItemEvent : function(c, f, h) {
		var d = this, a = d.mouseOverItem, b, g;
		switch (c) {
			case "mouseover" :
				if (f === a) {
					return false
				}
				d.mouseOverItem = f;
				return "mouseenter";
				break;
			case "mouseout" :
				if (a && typeof a.offsetParent === "object") {
					b = Ext.fly(d.mouseOverItem).getRegion().contains(h
							.getPoint());
					g = Ext.fly(h.getTarget()).hasCls(d.itemSelector);
					if (b && g) {
						return false
					}
				}
				d.mouseOverItem = null;
				return "mouseleave";
				break
		}
		return c
	},
	onItemMouseEnter : function(a, c, b, d) {
		if (this.trackOver) {
			this.highlightItem(c)
		}
	},
	onItemMouseLeave : function(a, c, b, d) {
		if (this.trackOver) {
			this.clearHighlight()
		}
	},
	onItemMouseDown : Ext.emptyFn,
	onItemMouseUp : Ext.emptyFn,
	onItemClick : Ext.emptyFn,
	onItemDblClick : Ext.emptyFn,
	onItemContextMenu : Ext.emptyFn,
	onItemKeyDown : Ext.emptyFn,
	onBeforeItemMouseDown : Ext.emptyFn,
	onBeforeItemMouseUp : Ext.emptyFn,
	onBeforeItemMouseEnter : Ext.emptyFn,
	onBeforeItemMouseLeave : Ext.emptyFn,
	onBeforeItemClick : Ext.emptyFn,
	onBeforeItemDblClick : Ext.emptyFn,
	onBeforeItemContextMenu : Ext.emptyFn,
	onBeforeItemKeyDown : Ext.emptyFn,
	onContainerMouseDown : Ext.emptyFn,
	onContainerMouseUp : Ext.emptyFn,
	onContainerMouseOver : Ext.emptyFn,
	onContainerMouseOut : Ext.emptyFn,
	onContainerClick : Ext.emptyFn,
	onContainerDblClick : Ext.emptyFn,
	onContainerContextMenu : Ext.emptyFn,
	onContainerKeyDown : Ext.emptyFn,
	onBeforeContainerMouseDown : Ext.emptyFn,
	onBeforeContainerMouseUp : Ext.emptyFn,
	onBeforeContainerMouseOver : Ext.emptyFn,
	onBeforeContainerMouseOut : Ext.emptyFn,
	onBeforeContainerClick : Ext.emptyFn,
	onBeforeContainerDblClick : Ext.emptyFn,
	onBeforeContainerContextMenu : Ext.emptyFn,
	onBeforeContainerKeyDown : Ext.emptyFn,
	highlightItem : function(b) {
		var a = this;
		a.clearHighlight();
		a.highlightedItem = b;
		Ext.fly(b).addCls(a.overItemCls)
	},
	clearHighlight : function() {
		var b = this, a = b.highlightedItem;
		if (a) {
			Ext.fly(a).removeCls(b.overItemCls);
			delete b.highlightedItem
		}
	},
	refresh : function() {
		this.clearHighlight();
		this.callParent(arguments)
	}
});
Ext.define("Ext.view.Table", {
	extend : "Ext.view.View",
	alias : "widget.tableview",
	uses : ["Ext.view.TableChunker", "Ext.util.DelayedTask",
			"Ext.util.MixedCollection"],
	cls : Ext.baseCSSPrefix + "grid-view",
	itemSelector : "." + Ext.baseCSSPrefix + "grid-row",
	cellSelector : "." + Ext.baseCSSPrefix + "grid-cell",
	selectedItemCls : Ext.baseCSSPrefix + "grid-row-selected",
	selectedCellCls : Ext.baseCSSPrefix + "grid-cell-selected",
	focusedItemCls : Ext.baseCSSPrefix + "grid-row-focused",
	overItemCls : Ext.baseCSSPrefix + "grid-row-over",
	altRowCls : Ext.baseCSSPrefix + "grid-row-alt",
	rowClsRe : /(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,
	cellRe : new RegExp("x-grid-cell-([^\\s]+) ", ""),
	trackOver : true,
	getRowClass : null,
	initComponent : function() {
		this.scrollState = {};
		this.selModel.view = this;
		this.headerCt.view = this;
		this.initFeatures();
		this.setNewTemplate();
		this.callParent();
		this.mon(this.store, {
					load : this.onStoreLoad,
					scope : this
				})
	},
	onStoreLoad : function() {
		if (this.invalidateScrollerOnRefresh) {
			if (Ext.isGecko) {
				if (!this.scrollToTopTask) {
					this.scrollToTopTask = Ext.create("Ext.util.DelayedTask",
							this.scrollToTop, this)
				}
				this.scrollToTopTask.delay(1)
			} else {
				this.scrollToTop()
			}
		}
	},
	scrollToTop : Ext.emptyFn,
	getGridColumns : function() {
		return this.headerCt.getGridColumns()
	},
	getHeaderAtIndex : function(a) {
		return this.headerCt.getHeaderAtIndex(a)
	},
	getCell : function(a, b) {
		var c = this.getNode(a);
		return Ext.fly(c).down(b.getCellSelector())
	},
	getFeature : function(b) {
		var a = this.featuresMC;
		if (a) {
			return a.get(b)
		}
	},
	initFeatures : function() {
		this.features = this.features || [];
		var b = this.features, c = b.length, a = 0;
		this.featuresMC = Ext.create("Ext.util.MixedCollection");
		for (; a < c; a++) {
			if (!b[a].isFeature) {
				b[a] = Ext.create("feature." + b[a].ftype, b[a])
			}
			b[a].view = this;
			this.featuresMC.add(b[a])
		}
	},
	attachEventsForFeatures : function() {
		var b = this.features, c = b.length, a = 0;
		for (; a < c; a++) {
			if (b[a].isFeature) {
				b[a].attachEvents()
			}
		}
	},
	afterRender : function() {
		this.callParent();
		this.mon(this.el, {
					scroll : this.fireBodyScroll,
					scope : this
				});
		this.attachEventsForFeatures()
	},
	fireBodyScroll : function(b, a) {
		this.fireEvent("bodyscroll", b, a)
	},
	prepareData : function(c, h, e) {
		var g = this.headerCt.prepareData(c, h, e, this), a = this.features, f = a.length, d = 0, b, j;
		for (; d < f; d++) {
			j = a[d];
			if (j.isFeature) {
				Ext.apply(g, j.getAdditionalData(c, h, e, g, this))
			}
		}
		return g
	},
	collectData : function(d, m) {
		var n = this.callParent(arguments), c = this.headerCt, l = c
				.getFullWidth(), b = this.features, h = b.length, a = {
			rows : n,
			fullWidth : l
		}, f = 0, p, e = 0, k, g;
		k = n.length;
		if (this.getRowClass) {
			for (; e < k; e++) {
				g = {};
				n[e]["rowCls"] = this.getRowClass(d[e], e, g, this.store)
			}
		}
		for (; f < h; f++) {
			p = b[f];
			if (p.isFeature && p.collectData && !p.disabled) {
				a = p.collectData(d, n, m, l, a);
				break
			}
		}
		return a
	},
	onHeaderResize : function(d, a, c) {
		var b = this.el;
		if (b) {
			this.saveScrollState();
			b.select("." + Ext.baseCSSPrefix + "grid-col-resizer-" + d.id)
					.setWidth(a);
			b.select("." + Ext.baseCSSPrefix + "grid-table-resizer")
					.setWidth(this.headerCt.getFullWidth());
			this.restoreScrollState();
			this.setNewTemplate();
			if (!c) {
				this.el.focus()
			}
		}
	},
	onHeaderShow : function(b, c, a) {
		if (c.oldWidth) {
			this.onHeaderResize(c, c.oldWidth, a);
			delete c.oldWidth
		} else {
			if (c.width && !c.flex) {
				this.onHeaderResize(c, c.width, a)
			}
		}
		this.setNewTemplate()
	},
	onHeaderHide : function(b, c, a) {
		this.onHeaderResize(c, 0, a)
	},
	setNewTemplate : function() {
		var a = this.headerCt.getColumnsForTpl(true);
		this.tpl = this.getTableChunker().getTableTpl({
					columns : a,
					features : this.features
				})
	},
	getTableChunker : function() {
		return this.chunker || Ext.view.TableChunker
	},
	addRowCls : function(b, a) {
		var c = this.getNode(b);
		if (c) {
			Ext.fly(c).addCls(a)
		}
	},
	removeRowCls : function(b, a) {
		var c = this.getNode(b);
		if (c) {
			Ext.fly(c).removeCls(a)
		}
	},
	onRowSelect : function(a) {
		this.addRowCls(a, this.selectedItemCls)
	},
	onRowDeselect : function(a) {
		this.removeRowCls(a, this.selectedItemCls);
		this.removeRowCls(a, this.focusedItemCls)
	},
	onCellSelect : function(b) {
		var a = this.getCellByPosition(b);
		if (a) {
			a.addCls(this.selectedCellCls)
		}
	},
	onCellDeselect : function(b) {
		var a = this.getCellByPosition(b);
		if (a) {
			a.removeCls(this.selectedCellCls)
		}
	},
	onCellFocus : function(a) {
		this.focusCell(a)
	},
	getCellByPosition : function(b) {
		var g = b.row, e = b.column, d = this.store, f = this.getNode(g), h = this.headerCt
				.getHeaderAtIndex(e), c, a = false;
		if (h) {
			c = h.getCellSelector();
			a = Ext.fly(f).down(c)
		}
		return a
	},
	onRowFocus : function(c, b, a) {
		var d = this.getNode(c);
		if (b) {
			this.addRowCls(c, this.focusedItemCls);
			if (!a) {
				this.focusRow(c)
			}
		} else {
			this.removeRowCls(c, this.focusedItemCls)
		}
	},
	focusRow : function(f) {
		var h = this.getNode(f), e = this.el, d = 0, b = this.ownerCt, c, g, a;
		if (h && this.el) {
			g = e.getRegion();
			c = Ext.fly(h).getRegion();
			if (c.top < g.top) {
				d = c.top - g.top
			} else {
				if (c.bottom > g.bottom) {
					d = c.bottom - g.bottom
				}
			}
			a = this.getRecord(h);
			f = this.store.indexOf(a);
			if (d) {
				b.scrollByDeltaY(d)
			}
			this.fireEvent("rowfocus", a, h, f)
		}
	},
	focusCell : function(g) {
		var i = this.getCellByPosition(g), b = this.el, d = 0, e = 0, c = b
				.getRegion(), a = this.ownerCt, h, f;
		if (i) {
			h = i.getRegion();
			if (h.top < c.top) {
				d = h.top - c.top
			} else {
				if (h.bottom > c.bottom) {
					d = h.bottom - c.bottom
				}
			}
			if (h.left < c.left) {
				e = h.left - c.left
			} else {
				if (h.right > c.right) {
					e = h.right - c.right
				}
			}
			if (d) {
				a.scrollByDeltaY(d)
			}
			if (e) {
				a.scrollByDeltaX(e)
			}
			b.focus();
			this.fireEvent("cellfocus", f, i, g)
		}
	},
	scrollByDelta : function(c, b) {
		b = b || "scrollTop";
		var a = this.el.dom;
		a[b] = (a[b] += c)
	},
	onUpdate : function(b, a) {
		this.callParent(arguments)
	},
	saveScrollState : function() {
		var b = this.el.dom, a = this.scrollState;
		a.left = b.scrollLeft;
		a.top = b.scrollTop
	},
	restoreScrollState : function() {
		var b = this.el.dom, a = this.scrollState, c = this.headerCt.el.dom;
		c.scrollLeft = b.scrollLeft = a.left;
		b.scrollTop = a.top
	},
	refresh : function(c) {
		var b = this, a;
		b.setNewTemplate();
		if (b.rendered) {
			a = b.el.child("table");
			if (a) {
				a.removeAllListeners()
			}
		}
		b.callParent(arguments);
		if (b.rendered) {
			a = b.el.child("table");
			if (a) {
				a.unselectable()
			}
			if (!c) {
				b.el.focus()
			}
		}
	},
	processItemEvent : function(g, b, l, i, d) {
		var f = this, j = d.getTarget(f.cellSelector, l), h = j
				? j.cellIndex
				: -1, a = f.statics().EventMap, c = f.getSelectionModel(), k;
		if (g == "keydown" && !j && c.getCurrentPosition) {
			j = f.getCellByPosition(c.getCurrentPosition());
			if (j) {
				j = j.dom;
				h = j.cellIndex
			}
		}
		k = f.fireEvent("uievent", g, f, j, i, h, d);
		if (k === false || f.callParent(arguments) === false) {
			return false
		}
		if (g == "mouseover" || g == "mouseout") {
			return true
		}
		return !((f["onBeforeCell" + a[g]](j, h, b, l, i, d) === false)
				|| (f.fireEvent("beforecell" + g, f, j, h, b, l, i, d) === false)
				|| (f["onCell" + a[g]](j, h, b, l, i, d) === false) || (f
				.fireEvent("cell" + g, f, j, h, b, l, i, d) === false))
	},
	processSpecialEvent : function(j) {
		var m = this, b = this.statics().EventMap, d = this.features, l = d.length, n = j.type, f, o, g, h, c, k, a = m.ownerCt;
		this.callParent(arguments);
		if (n == "mouseover" || n == "mouseout") {
			return
		}
		for (f = 0; f < l; f++) {
			o = d[f];
			if (o.hasFeatureEvent) {
				h = j.getTarget(o.eventSelector, m.getTargetEl());
				if (h) {
					g = o.eventPrefix;
					c = o.getFireEventArgs("before" + g + n, m, h);
					k = o.getFireEventArgs(g + n, m, h);
					if ((m.fireEvent.apply(m, c) === false)
							|| (a.fireEvent.apply(a, c) === false)
							|| (m.fireEvent.apply(m, k) === false)
							|| (a.fireEvent.apply(a, k) === false)) {
						return false
					}
				}
			}
		}
		return true
	},
	onCellMouseDown : Ext.emptyFn,
	onCellMouseUp : Ext.emptyFn,
	onCellClick : Ext.emptyFn,
	onCellDblClick : Ext.emptyFn,
	onCellContextMenu : Ext.emptyFn,
	onCellKeyDown : Ext.emptyFn,
	onBeforeCellMouseDown : Ext.emptyFn,
	onBeforeCellMouseUp : Ext.emptyFn,
	onBeforeCellClick : Ext.emptyFn,
	onBeforeCellDblClick : Ext.emptyFn,
	onBeforeCellContextMenu : Ext.emptyFn,
	onBeforeCellKeyDown : Ext.emptyFn,
	expandToFit : function(b) {
		var a = this.getMaxContentWidth(b);
		delete b.flex;
		b.setWidth(a)
	},
	getMaxContentWidth : function(g) {
		var a = g.getCellInnerSelector(), c = this.el.query(a), d = 0, f = c.length, e = g.el.dom.scrollWidth, b;
		for (; d < f; d++) {
			b = c[d].scrollWidth;
			if (b > e) {
				e = b
			}
		}
		return e
	},
	getPositionByEvent : function(d) {
		var b = d.getTarget(this.cellSelector), c = d
				.getTarget(this.itemSelector), a = this.getRecord(c), f = this
				.getHeaderByCell(b);
		return this.getPosition(a, f)
	},
	getHeaderByCell : function(b) {
		if (b) {
			var a = b.className.match(this.cellRe);
			if (a && a[1]) {
				return Ext.getCmp(a[1])
			}
		}
		return false
	},
	walkCells : function(j, k, g, l, a, m) {
		var n = j.row, d = j.column, i = this.store.getCount(), f = this
				.getFirstVisibleColumnIndex(), b = this
				.getLastVisibleColumnIndex(), h = {
			row : n,
			column : d
		}, c = this.headerCt.getHeaderAtIndex(d);
		if (!c || c.hidden) {
			return false
		}
		g = g || {};
		k = k.toLowerCase();
		switch (k) {
			case "right" :
				if (d === b) {
					if (l || n === i - 1) {
						return false
					}
					if (!g.ctrlKey) {
						h.row = n + 1;
						h.column = f
					}
				} else {
					if (!g.ctrlKey) {
						h.column = d + this.getRightGap(c)
					} else {
						h.column = b
					}
				}
				break;
			case "left" :
				if (d === f) {
					if (l || n === 0) {
						return false
					}
					if (!g.ctrlKey) {
						h.row = n - 1;
						h.column = b
					}
				} else {
					if (!g.ctrlKey) {
						h.column = d + this.getLeftGap(c)
					} else {
						h.column = f
					}
				}
				break;
			case "up" :
				if (n === 0) {
					return false
				} else {
					if (!g.ctrlKey) {
						h.row = n - 1
					} else {
						h.row = 0
					}
				}
				break;
			case "down" :
				if (n === i - 1) {
					return false
				} else {
					if (!g.ctrlKey) {
						h.row = n + 1
					} else {
						h.row = i - 1
					}
				}
				break
		}
		if (a && a.call(m || window, h) !== true) {
			return false
		} else {
			return h
		}
	},
	getFirstVisibleColumnIndex : function() {
		var c = this.getHeaderCt(), a = c.getGridColumns(), d = Ext.ComponentQuery
				.query(":not([hidden])", a), b = d[0];
		return c.getHeaderIndex(b)
	},
	getLastVisibleColumnIndex : function() {
		var c = this.getHeaderCt(), a = c.getGridColumns(), d = Ext.ComponentQuery
				.query(":not([hidden])", a), b = d[d.length - 1];
		return c.getHeaderIndex(b)
	},
	getHeaderCt : function() {
		return this.headerCt
	},
	getPosition : function(a, e) {
		var d = this, b = d.store, c = d.headerCt.getGridColumns();
		return {
			row : b.indexOf(a),
			column : Ext.Array.indexOf(c, e)
		}
	},
	getRightGap : function(a) {
		var f = this.getHeaderCt(), e = f.getGridColumns(), b = Ext.Array
				.indexOf(e, a), c = b + 1, d;
		for (; c <= e.length; c++) {
			if (!e[c].hidden) {
				d = c;
				break
			}
		}
		return d - b
	},
	beforeDestroy : function() {
		if (this.rendered) {
			table = this.el.child("table");
			if (table) {
				table.removeAllListeners()
			}
		}
		this.callParent(arguments)
	},
	getLeftGap : function(a) {
		var f = this.getHeaderCt(), e = f.getGridColumns(), c = Ext.Array
				.indexOf(e, a), d = c - 1, b;
		for (; d >= 0; d--) {
			if (!e[d].hidden) {
				b = d;
				break
			}
		}
		return b - c
	}
});
Ext.define("Ext.grid.View", {
			extend : "Ext.view.Table",
			alias : "widget.gridview",
			stripeRows : true,
			invalidateScrollerOnRefresh : true,
			scrollToTop : function() {
				if (this.rendered) {
					var b = this.ownerCt, a = b.verticalScroller;
					if (a) {
						a.scrollToTop()
					}
				}
			},
			onAdd : function(c, a, b) {
				this.callParent(arguments);
				this.doStripeRows(b)
			},
			onRemove : function(c, a, b) {
				this.callParent(arguments);
				this.doStripeRows(b)
			},
			doStripeRows : function(a) {
				if (this.stripeRows) {
					var c = this.getNodes(a), e = c.length, b = 0, d;
					for (; b < e; b++) {
						d = c[b];
						d.className = d.className.replace(this.rowClsRe, " ");
						if (b % 2 === 1) {
							d.className += (" " + this.altRowCls)
						}
					}
				}
			},
			refresh : function(b) {
				this.callParent(arguments);
				this.doStripeRows(0);
				var a = this.up("gridpanel");
				if (a && this.invalidateScrollerOnRefresh) {
					a.invalidateScroller()
				}
			}
		});
Ext.define("Ext.tree.View", {
	extend : "Ext.view.Table",
	alias : "widget.treeview",
	loadingCls : Ext.baseCSSPrefix + "grid-tree-loading",
	expandedCls : Ext.baseCSSPrefix + "grid-tree-node-expanded",
	expanderSelector : "." + Ext.baseCSSPrefix + "tree-expander",
	checkboxSelector : "." + Ext.baseCSSPrefix + "tree-checkbox",
	expanderIconOverCls : Ext.baseCSSPrefix + "tree-expander-over",
	blockRefresh : true,
	rootVisible : true,
	expandDuration : 250,
	collapseDuration : 250,
	toggleOnDblClick : true,
	initComponent : function() {
		var a = this;
		if (a.initialConfig.animate === undefined) {
			a.animate = Ext.enableFx
		}
		a.store = Ext.create("Ext.data.NodeStore", {
					recursive : true,
					rootVisible : a.rootVisible,
					listeners : {
						beforeexpand : a.onBeforeExpand,
						expand : a.onExpand,
						beforecollapse : a.onBeforeCollapse,
						collapse : a.onCollapse,
						scope : a
					}
				});
		if (a.node) {
			a.setRootNode(a.node)
		}
		a.animQueue = {};
		a.callParent(arguments)
	},
	onClear : function() {
		this.store.removeAll()
	},
	setRootNode : function(b) {
		var a = this;
		a.store.setNode(b);
		a.node = b;
		if (!a.rootVisible) {
			b.expand()
		}
	},
	onRender : function() {
		var c = this, b = {
			delegate : c.expanderSelector
		}, a;
		c.callParent(arguments);
		a = c.el;
		a.on({
					scope : c,
					delegate : c.expanderSelector,
					mouseover : c.onExpanderMouseOver,
					mouseout : c.onExpanderMouseOut
				});
		a.on({
					scope : c,
					delegate : c.checkboxSelector,
					click : c.onCheckboxChange
				})
	},
	onCheckboxChange : function(f, b) {
		var c = f.getTarget(this.getItemSelector(), this.getTargetEl()), a, d;
		if (c) {
			a = this.getRecord(c);
			d = !a.get("checked");
			a.set("checked", d);
			this.fireEvent("checkchange", a, d)
		}
	},
	getChecked : function() {
		var a = [];
		this.node.cascadeBy(function(b) {
					if (b.get("checked")) {
						a.push(b)
					}
				});
		return a
	},
	isItemChecked : function(a) {
		return a.get("checked")
	},
	createAnimWrap : function(h, j) {
		var f = "", e = this.panel.headerCt, b = e.getGridColumns(), g = 0, k = b.length, l, d = this
				.getNode(h), a, c;
		for (; g < k; g++) {
			l = b[g];
			f += '<th style="width: ' + (l.hidden ? 0 : l.getDesiredWidth())
					+ 'px; height: 0px;"></th>'
		}
		c = Ext.get(d);
		a = c.insertSibling({
			tag : "tr",
			html : [
					'<td colspan="' + e.getColumnCount() + '">',
					'<div class="' + Ext.baseCSSPrefix + 'tree-animator-wrap">',
					'<table class="' + Ext.baseCSSPrefix
							+ 'grid-table" style="width: ' + e.getFullWidth()
							+ 'px;"><tbody>', f, "</tbody></table>", "</div>",
					"</td>"].join("")
		}, "after");
		return {
			record : h,
			node : d,
			el : a,
			expanding : false,
			collapsing : false,
			animating : false,
			animateEl : a.down("div"),
			targetEl : a.down("tbody")
		}
	},
	getAnimWrap : function(a) {
		if (!this.animate) {
			return null
		}
		while (a) {
			if (a.animWrap) {
				return a.animWrap
			}
			a = a.parentNode
		}
		return null
	},
	doAdd : function(b, d, h) {
		var i = this, f = d[0], k = f.parentNode, j = i.all.elements, m = 0, e = i
				.getAnimWrap(k), l, c, g;
		if (!e || !e.expanding) {
			i.resetScrollers();
			return i.callParent(arguments)
		}
		k = e.record;
		l = e.targetEl;
		c = l.dom.childNodes;
		g = c.length - 1;
		m = h - i.indexOf(k) - 1;
		if (!g || m >= g) {
			l.appendChild(b)
		} else {
			Ext.fly(c[m + 1]).insertSibling(b, "before", true)
		}
		if (h < j.length) {
			j.splice.apply(j, [h, 0].concat(b))
		} else {
			j.push.apply(j, b)
		}
		if (e.isAnimating) {
			i.onExpand(k)
		}
	},
	doRemove : function(a, c) {
		var g = this, e = a.parentNode, d = g.all, b = g.getAnimWrap(a), f = d
				.item(c).dom;
		if (!b || !b.collapsing) {
			g.resetScrollers();
			return g.callParent(arguments)
		}
		b.targetEl.appendChild(f);
		d.removeElement(c)
	},
	onBeforeExpand : function(d, b, c) {
		var e = this, a;
		if (!e.animate) {
			return
		}
		if (e.getNode(d)) {
			a = e.getAnimWrap(d);
			if (!a) {
				a = d.animWrap = e.createAnimWrap(d);
				a.animateEl.setHeight(0)
			} else {
				if (a.collapsing) {
					a.targetEl.select(e.itemSelector).remove()
				}
			}
			a.expanding = true;
			a.collapsing = false
		}
	},
	onExpand : function(c) {
		var d = this, a = d.animQueue, h = c.getId(), b, e, f, g;
		if (d.singleExpand) {
			d.ensureSingleExpand(c)
		}
		b = d.getAnimWrap(c);
		if (!b) {
			d.resetScrollers();
			return
		}
		e = b.animateEl;
		f = b.targetEl;
		e.stopAnimation();
		a[h] = true;
		e.slideIn("t", {
					duration : d.expandDuration,
					listeners : {
						scope : d,
						lastframe : function() {
							b.el.insertSibling(f.query(d.itemSelector),
									"before");
							b.el.remove();
							d.resetScrollers();
							delete b.record.animWrap;
							delete a[h]
						}
					}
				});
		b.isAnimating = true
	},
	resetScrollers : function() {
		var a = this.panel;
		a.determineScrollbars();
		a.invalidateScroller()
	},
	onBeforeCollapse : function(d, b, c) {
		var e = this, a;
		if (!e.animate) {
			return
		}
		if (e.getNode(d)) {
			a = e.getAnimWrap(d);
			if (!a) {
				a = d.animWrap = e.createAnimWrap(d, c)
			} else {
				if (a.expanding) {
					a.targetEl.select(this.itemSelector).remove()
				}
			}
			a.expanding = false;
			a.collapsing = true
		}
	},
	onCollapse : function(c) {
		var d = this, a = d.animQueue, g = c.getId(), b = d.getAnimWrap(c), e, f;
		if (!b) {
			d.resetScrollers();
			return
		}
		e = b.animateEl;
		f = b.targetEl;
		a[g] = true;
		e.stopAnimation();
		e.slideOut("t", {
					duration : d.collapseDuration,
					listeners : {
						scope : d,
						lastframe : function() {
							b.el.remove();
							delete b.record.animWrap;
							d.resetScrollers();
							delete a[g]
						}
					}
				});
		b.isAnimating = true
	},
	isAnimating : function(a) {
		return !!this.animQueue[a.getId()]
	},
	collectData : function(c) {
		var f = this.callParent(arguments), e = f.rows, a = e.length, d = 0, g, b;
		for (; d < a; d++) {
			g = e[d];
			b = c[d];
			if (b.get("qtip")) {
				g.rowAttr = 'data-qtip="' + b.get("qtip") + '"';
				if (b.get("qtitle")) {
					g.rowAttr += ' data-qtitle="' + b.get("qtitle") + '"'
				}
			}
			if (b.isExpanded()) {
				g.rowCls = (g.rowCls || "") + " " + this.expandedCls
			}
			if (b.isLoading()) {
				g.rowCls = (g.rowCls || "") + " " + this.loadingCls
			}
		}
		return f
	},
	expand : function(b, a, d, c) {
		return b.expand(a, d, c)
	},
	collapse : function(b, a, d, c) {
		return b.collapse(a, d, c)
	},
	toggle : function(a) {
		this[a.isExpanded() ? "collapse" : "expand"](a)
	},
	onItemDblClick : function(a, c, b) {
		this.callParent(arguments);
		if (this.toggleOnDblClick) {
			this.toggle(a)
		}
	},
	onBeforeItemMouseDown : function(a, c, b, d) {
		if (d.getTarget(this.expanderSelector, c)) {
			return false
		}
		return this.callParent(arguments)
	},
	onItemClick : function(a, c, b, d) {
		if (d.getTarget(this.expanderSelector, c)) {
			this.toggle(a);
			return false
		}
		return this.callParent(arguments)
	},
	onExpanderMouseOver : function(b, a) {
		b.getTarget(this.cellSelector, 10, true)
				.addCls(this.expanderIconOverCls)
	},
	onExpanderMouseOut : function(b, a) {
		b.getTarget(this.cellSelector, 10, true)
				.removeCls(this.expanderIconOverCls)
	},
	getTreeStore : function() {
		return this.panel.store
	},
	ensureSingleExpand : function(b) {
		var a = b.parentNode;
		if (a) {
			a.eachChild(function(c) {
						if (c !== b && c.isExpanded()) {
							c.collapse()
						}
					})
		}
	}
});
Ext.define("Ext.dd.DragDrop", {
	requires : ["Ext.dd.DragDropManager"],
	constructor : function(c, a, b) {
		if (c) {
			this.init(c, a, b)
		}
	},
	id : null,
	config : null,
	dragElId : null,
	handleElId : null,
	invalidHandleTypes : null,
	invalidHandleIds : null,
	invalidHandleClasses : null,
	startPageX : 0,
	startPageY : 0,
	groups : null,
	locked : false,
	lock : function() {
		this.locked = true
	},
	moveOnly : false,
	unlock : function() {
		this.locked = false
	},
	isTarget : true,
	padding : null,
	_domRef : null,
	__ygDragDrop : true,
	constrainX : false,
	constrainY : false,
	minX : 0,
	maxX : 0,
	minY : 0,
	maxY : 0,
	maintainOffset : false,
	xTicks : null,
	yTicks : null,
	primaryButtonOnly : true,
	available : false,
	hasOuterHandles : false,
	b4StartDrag : function(a, b) {
	},
	startDrag : function(a, b) {
	},
	b4Drag : function(a) {
	},
	onDrag : function(a) {
	},
	onDragEnter : function(a, b) {
	},
	b4DragOver : function(a) {
	},
	onDragOver : function(a, b) {
	},
	b4DragOut : function(a) {
	},
	onDragOut : function(a, b) {
	},
	b4DragDrop : function(a) {
	},
	onDragDrop : function(a, b) {
	},
	onInvalidDrop : function(a) {
	},
	b4EndDrag : function(a) {
	},
	endDrag : function(a) {
	},
	b4MouseDown : function(a) {
	},
	onMouseDown : function(a) {
	},
	onMouseUp : function(a) {
	},
	onAvailable : function() {
	},
	defaultPadding : {
		left : 0,
		right : 0,
		top : 0,
		bottom : 0
	},
	constrainTo : function(h, f, m) {
		if (Ext.isNumber(f)) {
			f = {
				left : f,
				right : f,
				top : f,
				bottom : f
			}
		}
		f = f || this.defaultPadding;
		var j = Ext.get(this.getEl()).getBox(), a = Ext.get(h), l = a
				.getScroll(), i, d = a.dom;
		if (d == document.body) {
			i = {
				x : l.left,
				y : l.top,
				width : Ext.core.Element.getViewWidth(),
				height : Ext.core.Element.getViewHeight()
			}
		} else {
			var k = a.getXY();
			i = {
				x : k[0],
				y : k[1],
				width : d.clientWidth,
				height : d.clientHeight
			}
		}
		var g = j.y - i.y, e = j.x - i.x;
		this.resetConstraints();
		this.setXConstraint(e - (f.left || 0), i.width - e - j.width
						- (f.right || 0), this.xTickSize);
		this.setYConstraint(g - (f.top || 0), i.height - g - j.height
						- (f.bottom || 0), this.yTickSize)
	},
	getEl : function() {
		if (!this._domRef) {
			this._domRef = Ext.getDom(this.id)
		}
		return this._domRef
	},
	getDragEl : function() {
		return Ext.getDom(this.dragElId)
	},
	init : function(c, a, b) {
		this.initTarget(c, a, b);
		Ext.EventManager.on(this.id, "mousedown", this.handleMouseDown, this)
	},
	initTarget : function(c, a, b) {
		this.config = b || {};
		this.DDMInstance = Ext.dd.DragDropManager;
		this.groups = {};
		if (typeof c !== "string") {
			c = Ext.id(c)
		}
		this.id = c;
		this.addToGroup((a) ? a : "default");
		this.handleElId = c;
		this.setDragElId(c);
		this.invalidHandleTypes = {
			A : "A"
		};
		this.invalidHandleIds = {};
		this.invalidHandleClasses = [];
		this.applyConfig();
		this.handleOnAvailable()
	},
	applyConfig : function() {
		this.padding = this.config.padding || [0, 0, 0, 0];
		this.isTarget = (this.config.isTarget !== false);
		this.maintainOffset = (this.config.maintainOffset);
		this.primaryButtonOnly = (this.config.primaryButtonOnly !== false)
	},
	handleOnAvailable : function() {
		this.available = true;
		this.resetConstraints();
		this.onAvailable()
	},
	setPadding : function(c, a, d, b) {
		if (!a && 0 !== a) {
			this.padding = [c, c, c, c]
		} else {
			if (!d && 0 !== d) {
				this.padding = [c, a, c, a]
			} else {
				this.padding = [c, a, d, b]
			}
		}
	},
	setInitPosition : function(d, c) {
		var e = this.getEl();
		if (!this.DDMInstance.verifyEl(e)) {
			return
		}
		var b = d || 0;
		var a = c || 0;
		var f = Ext.core.Element.getXY(e);
		this.initPageX = f[0] - b;
		this.initPageY = f[1] - a;
		this.lastPageX = f[0];
		this.lastPageY = f[1];
		this.setStartPosition(f)
	},
	setStartPosition : function(b) {
		var a = b || Ext.core.Element.getXY(this.getEl());
		this.deltaSetXY = null;
		this.startPageX = a[0];
		this.startPageY = a[1]
	},
	addToGroup : function(a) {
		this.groups[a] = true;
		this.DDMInstance.regDragDrop(this, a)
	},
	removeFromGroup : function(a) {
		if (this.groups[a]) {
			delete this.groups[a]
		}
		this.DDMInstance.removeDDFromGroup(this, a)
	},
	setDragElId : function(a) {
		this.dragElId = a
	},
	setHandleElId : function(a) {
		if (typeof a !== "string") {
			a = Ext.id(a)
		}
		this.handleElId = a;
		this.DDMInstance.regHandle(this.id, a)
	},
	setOuterHandleElId : function(a) {
		if (typeof a !== "string") {
			a = Ext.id(a)
		}
		Ext.EventManager.on(a, "mousedown", this.handleMouseDown, this);
		this.setHandleElId(a);
		this.hasOuterHandles = true
	},
	unreg : function() {
		Ext.EventManager.un(this.id, "mousedown", this.handleMouseDown, this);
		this._domRef = null;
		this.DDMInstance._remove(this)
	},
	destroy : function() {
		this.unreg()
	},
	isLocked : function() {
		return (this.DDMInstance.isLocked() || this.locked)
	},
	handleMouseDown : function(c, b) {
		if (this.primaryButtonOnly && c.button != 0) {
			return
		}
		if (this.isLocked()) {
			return
		}
		this.DDMInstance.refreshCache(this.groups);
		var a = c.getPoint();
		if (!this.hasOuterHandles && !this.DDMInstance.isOverTarget(a, this)) {
		} else {
			if (this.clickValidator(c)) {
				this.setStartPosition();
				this.b4MouseDown(c);
				this.onMouseDown(c);
				this.DDMInstance.handleMouseDown(c, this);
				this.DDMInstance.stopEvent(c)
			} else {
			}
		}
	},
	clickValidator : function(b) {
		var a = b.getTarget();
		return (this.isValidHandleChild(a) && (this.id == this.handleElId || this.DDMInstance
				.handleWasClicked(a, this.id)))
	},
	addInvalidHandleType : function(a) {
		var b = a.toUpperCase();
		this.invalidHandleTypes[b] = b
	},
	addInvalidHandleId : function(a) {
		if (typeof a !== "string") {
			a = Ext.id(a)
		}
		this.invalidHandleIds[a] = a
	},
	addInvalidHandleClass : function(a) {
		this.invalidHandleClasses.push(a)
	},
	removeInvalidHandleType : function(a) {
		var b = a.toUpperCase();
		delete this.invalidHandleTypes[b]
	},
	removeInvalidHandleId : function(a) {
		if (typeof a !== "string") {
			a = Ext.id(a)
		}
		delete this.invalidHandleIds[a]
	},
	removeInvalidHandleClass : function(b) {
		for (var c = 0, a = this.invalidHandleClasses.length; c < a; ++c) {
			if (this.invalidHandleClasses[c] == b) {
				delete this.invalidHandleClasses[c]
			}
		}
	},
	isValidHandleChild : function(d) {
		var c = true;
		var g;
		try {
			g = d.nodeName.toUpperCase()
		} catch (f) {
			g = d.nodeName
		}
		c = c && !this.invalidHandleTypes[g];
		c = c && !this.invalidHandleIds[d.id];
		for (var b = 0, a = this.invalidHandleClasses.length; c && b < a; ++b) {
			c = !Ext.fly(d).hasCls(this.invalidHandleClasses[b])
		}
		return c
	},
	setXTicks : function(d, a) {
		this.xTicks = [];
		this.xTickSize = a;
		var c = {};
		for (var b = this.initPageX; b >= this.minX; b = b - a) {
			if (!c[b]) {
				this.xTicks[this.xTicks.length] = b;
				c[b] = true
			}
		}
		for (b = this.initPageX; b <= this.maxX; b = b + a) {
			if (!c[b]) {
				this.xTicks[this.xTicks.length] = b;
				c[b] = true
			}
		}
		Ext.Array.sort(this.xTicks, this.DDMInstance.numericSort)
	},
	setYTicks : function(d, a) {
		this.yTicks = [];
		this.yTickSize = a;
		var c = {};
		for (var b = this.initPageY; b >= this.minY; b = b - a) {
			if (!c[b]) {
				this.yTicks[this.yTicks.length] = b;
				c[b] = true
			}
		}
		for (b = this.initPageY; b <= this.maxY; b = b + a) {
			if (!c[b]) {
				this.yTicks[this.yTicks.length] = b;
				c[b] = true
			}
		}
		Ext.Array.sort(this.yTicks, this.DDMInstance.numericSort)
	},
	setXConstraint : function(c, b, a) {
		this.leftConstraint = c;
		this.rightConstraint = b;
		this.minX = this.initPageX - c;
		this.maxX = this.initPageX + b;
		if (a) {
			this.setXTicks(this.initPageX, a)
		}
		this.constrainX = true
	},
	clearConstraints : function() {
		this.constrainX = false;
		this.constrainY = false;
		this.clearTicks()
	},
	clearTicks : function() {
		this.xTicks = null;
		this.yTicks = null;
		this.xTickSize = 0;
		this.yTickSize = 0
	},
	setYConstraint : function(a, c, b) {
		this.topConstraint = a;
		this.bottomConstraint = c;
		this.minY = this.initPageY - a;
		this.maxY = this.initPageY + c;
		if (b) {
			this.setYTicks(this.initPageY, b)
		}
		this.constrainY = true
	},
	resetConstraints : function() {
		if (this.initPageX || this.initPageX === 0) {
			var b = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
			var a = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
			this.setInitPosition(b, a)
		} else {
			this.setInitPosition()
		}
		if (this.constrainX) {
			this.setXConstraint(this.leftConstraint, this.rightConstraint,
					this.xTickSize)
		}
		if (this.constrainY) {
			this.setYConstraint(this.topConstraint, this.bottomConstraint,
					this.yTickSize)
		}
	},
	getTick : function(g, d) {
		if (!d) {
			return g
		} else {
			if (d[0] >= g) {
				return d[0]
			} else {
				for (var b = 0, a = d.length; b < a; ++b) {
					var c = b + 1;
					if (d[c] && d[c] >= g) {
						var f = g - d[b];
						var e = d[c] - g;
						return (e > f) ? d[b] : d[c]
					}
				}
				return d[d.length - 1]
			}
		}
	},
	toString : function() {
		return ("DragDrop " + this.id)
	}
});
Ext.define("Ext.dd.DD", {
	extend : "Ext.dd.DragDrop",
	requires : ["Ext.dd.DragDropManager"],
	constructor : function(c, a, b) {
		if (c) {
			this.init(c, a, b)
		}
	},
	scroll : true,
	autoOffset : function(c, b) {
		var a = c - this.startPageX;
		var d = b - this.startPageY;
		this.setDelta(a, d)
	},
	setDelta : function(b, a) {
		this.deltaX = b;
		this.deltaY = a
	},
	setDragElPos : function(c, b) {
		var a = this.getDragEl();
		this.alignElWithMouse(a, c, b)
	},
	alignElWithMouse : function(b, e, c) {
		var f = this.getTargetCoord(e, c), d = b.dom ? b : Ext.fly(b, "_dd"), k = d
				.getSize(), h = Ext.core.Element, i;
		if (!this.deltaSetXY) {
			i = this.cachedViewportSize = {
				width : h.getDocumentWidth(),
				height : h.getDocumentHeight()
			};
			var a = [Math.max(0, Math.min(f.x, i.width - k.width)),
					Math.max(0, Math.min(f.y, i.height - k.height))];
			d.setXY(a);
			var j = d.getLeft(true);
			var g = d.getTop(true);
			this.deltaSetXY = [j - f.x, g - f.y]
		} else {
			i = this.cachedViewportSize;
			d.setLeftTop(Math.max(0, Math.min(f.x + this.deltaSetXY[0], i.width
											- k.width)), Math.max(0, Math.min(
									f.y + this.deltaSetXY[1], i.height
											- k.height)))
		}
		this.cachePosition(f.x, f.y);
		this.autoScroll(f.x, f.y, b.offsetHeight, b.offsetWidth);
		return f
	},
	cachePosition : function(b, a) {
		if (b) {
			this.lastPageX = b;
			this.lastPageY = a
		} else {
			var c = Ext.core.Element.getXY(this.getEl());
			this.lastPageX = c[0];
			this.lastPageY = c[1]
		}
	},
	autoScroll : function(k, j, e, l) {
		if (this.scroll) {
			var m = Ext.core.Element.getViewHeight();
			var b = Ext.core.Element.getViewWidth();
			var o = this.DDMInstance.getScrollTop();
			var d = this.DDMInstance.getScrollLeft();
			var i = e + j;
			var n = l + k;
			var g = (m + o - j - this.deltaY);
			var f = (b + d - k - this.deltaX);
			var c = 40;
			var a = (document.all) ? 80 : 30;
			if (i > m && g < c) {
				window.scrollTo(d, o + a)
			}
			if (j < o && o > 0 && j - o < c) {
				window.scrollTo(d, o - a)
			}
			if (n > b && f < c) {
				window.scrollTo(d + a, o)
			}
			if (k < d && d > 0 && k - d < c) {
				window.scrollTo(d - a, o)
			}
		}
	},
	getTargetCoord : function(c, b) {
		var a = c - this.deltaX;
		var d = b - this.deltaY;
		if (this.constrainX) {
			if (a < this.minX) {
				a = this.minX
			}
			if (a > this.maxX) {
				a = this.maxX
			}
		}
		if (this.constrainY) {
			if (d < this.minY) {
				d = this.minY
			}
			if (d > this.maxY) {
				d = this.maxY
			}
		}
		a = this.getTick(a, this.xTicks);
		d = this.getTick(d, this.yTicks);
		return {
			x : a,
			y : d
		}
	},
	applyConfig : function() {
		this.callParent();
		this.scroll = (this.config.scroll !== false)
	},
	b4MouseDown : function(a) {
		this.autoOffset(a.getPageX(), a.getPageY())
	},
	b4Drag : function(a) {
		this.setDragElPos(a.getPageX(), a.getPageY())
	},
	toString : function() {
		return ("DD " + this.id)
	}
});
Ext.define("Ext.dd.DDProxy", {
			extend : "Ext.dd.DD",
			statics : {
				dragElId : "ygddfdiv"
			},
			constructor : function(c, a, b) {
				if (c) {
					this.init(c, a, b);
					this.initFrame()
				}
			},
			resizeFrame : true,
			centerFrame : false,
			createFrame : function() {
				var b = this;
				var a = document.body;
				if (!a || !a.firstChild) {
					setTimeout(function() {
								b.createFrame()
							}, 50);
					return
				}
				var d = this.getDragEl();
				if (!d) {
					d = document.createElement("div");
					d.id = this.dragElId;
					var c = d.style;
					c.position = "absolute";
					c.visibility = "hidden";
					c.cursor = "move";
					c.border = "2px solid #aaa";
					c.zIndex = 999;
					a.insertBefore(d, a.firstChild)
				}
			},
			initFrame : function() {
				this.createFrame()
			},
			applyConfig : function() {
				this.callParent();
				this.resizeFrame = (this.config.resizeFrame !== false);
				this.centerFrame = (this.config.centerFrame);
				this.setDragElId(this.config.dragElId
						|| Ext.dd.DDProxy.dragElId)
			},
			showFrame : function(e, d) {
				var c = this.getEl();
				var a = this.getDragEl();
				var b = a.style;
				this._resizeProxy();
				if (this.centerFrame) {
					this.setDelta(Math.round(parseInt(b.width, 10) / 2), Math
									.round(parseInt(b.height, 10) / 2))
				}
				this.setDragElPos(e, d);
				Ext.fly(a).show()
			},
			_resizeProxy : function() {
				if (this.resizeFrame) {
					var a = this.getEl();
					Ext.fly(this.getDragEl()).setSize(a.offsetWidth,
							a.offsetHeight)
				}
			},
			b4MouseDown : function(b) {
				var a = b.getPageX();
				var c = b.getPageY();
				this.autoOffset(a, c);
				this.setDragElPos(a, c)
			},
			b4StartDrag : function(a, b) {
				this.showFrame(a, b)
			},
			b4EndDrag : function(a) {
				Ext.fly(this.getDragEl()).hide()
			},
			endDrag : function(c) {
				var b = this.getEl();
				var a = this.getDragEl();
				a.style.visibility = "";
				this.beforeMove();
				b.style.visibility = "hidden";
				Ext.dd.DDM.moveToEl(b, a);
				a.style.visibility = "hidden";
				b.style.visibility = "";
				this.afterDrag()
			},
			beforeMove : function() {
			},
			afterDrag : function() {
			},
			toString : function() {
				return ("DDProxy " + this.id)
			}
		});
Ext.define("Ext.dd.DragSource", {
			extend : "Ext.dd.DDProxy",
			requires : ["Ext.dd.StatusProxy", "Ext.dd.DragDropManager"],
			dropAllowed : Ext.baseCSSPrefix + "dd-drop-ok",
			dropNotAllowed : Ext.baseCSSPrefix + "dd-drop-nodrop",
			animRepair : true,
			repairHighlightColor : "c3daf9",
			constructor : function(b, a) {
				this.el = Ext.get(b);
				if (!this.dragData) {
					this.dragData = {}
				}
				Ext.apply(this, a);
				if (!this.proxy) {
					this.proxy = Ext.create("Ext.dd.StatusProxy", {
								animRepair : this.animRepair
							})
				}
				this.callParent([this.el.dom, this.ddGroup || this.group, {
							dragElId : this.proxy.id,
							resizeFrame : false,
							isTarget : false,
							scroll : this.scroll === true
						}]);
				this.dragging = false
			},
			getDragData : function(a) {
				return this.dragData
			},
			onDragEnter : function(c, d) {
				var b = Ext.dd.DragDropManager.getDDById(d);
				this.cachedTarget = b;
				if (this.beforeDragEnter(b, c, d) !== false) {
					if (b.isNotifyTarget) {
						var a = b.notifyEnter(this, c, this.dragData);
						this.proxy.setStatus(a)
					} else {
						this.proxy.setStatus(this.dropAllowed)
					}
					if (this.afterDragEnter) {
						this.afterDragEnter(b, c, d)
					}
				}
			},
			beforeDragEnter : function(b, a, c) {
				return true
			},
			alignElWithMouse : function() {
				this.callParent(arguments);
				this.proxy.sync()
			},
			onDragOver : function(c, d) {
				var b = this.cachedTarget
						|| Ext.dd.DragDropManager.getDDById(d);
				if (this.beforeDragOver(b, c, d) !== false) {
					if (b.isNotifyTarget) {
						var a = b.notifyOver(this, c, this.dragData);
						this.proxy.setStatus(a)
					}
					if (this.afterDragOver) {
						this.afterDragOver(b, c, d)
					}
				}
			},
			beforeDragOver : function(b, a, c) {
				return true
			},
			onDragOut : function(b, c) {
				var a = this.cachedTarget
						|| Ext.dd.DragDropManager.getDDById(c);
				if (this.beforeDragOut(a, b, c) !== false) {
					if (a.isNotifyTarget) {
						a.notifyOut(this, b, this.dragData)
					}
					this.proxy.reset();
					if (this.afterDragOut) {
						this.afterDragOut(a, b, c)
					}
				}
				this.cachedTarget = null
			},
			beforeDragOut : function(b, a, c) {
				return true
			},
			onDragDrop : function(b, c) {
				var a = this.cachedTarget
						|| Ext.dd.DragDropManager.getDDById(c);
				if (this.beforeDragDrop(a, b, c) !== false) {
					if (a.isNotifyTarget) {
						if (a.notifyDrop(this, b, this.dragData) !== false) {
							this.onValidDrop(a, b, c)
						} else {
							this.onInvalidDrop(a, b, c)
						}
					} else {
						this.onValidDrop(a, b, c)
					}
					if (this.afterDragDrop) {
						this.afterDragDrop(a, b, c)
					}
				}
				delete this.cachedTarget
			},
			beforeDragDrop : function(b, a, c) {
				return true
			},
			onValidDrop : function(b, a, c) {
				this.hideProxy();
				if (this.afterValidDrop) {
					this.afterValidDrop(b, a, c)
				}
			},
			getRepairXY : function(b, a) {
				return this.el.getXY()
			},
			onInvalidDrop : function(b, a, c) {
				this.beforeInvalidDrop(b, a, c);
				if (this.cachedTarget) {
					if (this.cachedTarget.isNotifyTarget) {
						this.cachedTarget.notifyOut(this, a, this.dragData)
					}
					this.cacheTarget = null
				}
				this.proxy.repair(this.getRepairXY(a, this.dragData),
						this.afterRepair, this);
				if (this.afterInvalidDrop) {
					this.afterInvalidDrop(a, c)
				}
			},
			afterRepair : function() {
				var a = this;
				if (Ext.enableFx) {
					a.el.highlight(a.repairHighlightColor)
				}
				a.dragging = false
			},
			beforeInvalidDrop : function(b, a, c) {
				return true
			},
			handleMouseDown : function(b) {
				if (this.dragging) {
					return
				}
				var a = this.getDragData(b);
				if (a && this.onBeforeDrag(a, b) !== false) {
					this.dragData = a;
					this.proxy.stop();
					this.callParent(arguments)
				}
			},
			onBeforeDrag : function(a, b) {
				return true
			},
			onStartDrag : Ext.emptyFn,
			startDrag : function(a, b) {
				this.proxy.reset();
				this.dragging = true;
				this.proxy.update("");
				this.onInitDrag(a, b);
				this.proxy.show()
			},
			onInitDrag : function(a, c) {
				var b = this.el.dom.cloneNode(true);
				b.id = Ext.id();
				this.proxy.update(b);
				this.onStartDrag(a, c);
				return true
			},
			getProxy : function() {
				return this.proxy
			},
			hideProxy : function() {
				this.proxy.hide();
				this.proxy.reset(true);
				this.dragging = false
			},
			triggerCacheRefresh : function() {
				Ext.dd.DDM.refreshCache(this.groups)
			},
			b4EndDrag : function(a) {
			},
			endDrag : function(a) {
				this.onEndDrag(this.dragData, a)
			},
			onEndDrag : function(a, b) {
			},
			autoOffset : function(a, b) {
				this.setDelta(-12, -20)
			},
			destroy : function() {
				this.callParent();
				Ext.destroy(this.proxy)
			}
		});
Ext.define("Ext.panel.DD", {
			extend : "Ext.dd.DragSource",
			requires : ["Ext.panel.Proxy"],
			constructor : function(b, a) {
				this.panel = b;
				this.dragData = {
					panel : b
				};
				this.proxy = Ext.create("Ext.panel.Proxy", b, a);
				this.callParent([b.el, a]);
				Ext.defer(function() {
							var d = b.header, c = b.body;
							if (d) {
								this.setHandleElId(d.id);
								c = d.el
							}
							c.setStyle("cursor", "move");
							this.scroll = false
						}, 200, this)
			},
			showFrame : Ext.emptyFn,
			startDrag : Ext.emptyFn,
			b4StartDrag : function(a, b) {
				this.proxy.show()
			},
			b4MouseDown : function(b) {
				var a = b.getPageX(), c = b.getPageY();
				this.autoOffset(a, c)
			},
			onInitDrag : function(a, b) {
				this.onStartDrag(a, b);
				return true
			},
			createFrame : Ext.emptyFn,
			getDragEl : function(a) {
				return this.proxy.ghost.el.dom
			},
			endDrag : function(a) {
				this.proxy.hide();
				this.panel.saveState()
			},
			autoOffset : function(a, b) {
				a -= this.startPageX;
				b -= this.startPageY;
				this.setDelta(a, b)
			}
		});
Ext.define("Ext.panel.Panel", {
	extend : "Ext.panel.AbstractPanel",
	requires : ["Ext.panel.Header", "Ext.fx.Anim", "Ext.util.KeyMap",
			"Ext.panel.DD", "Ext.XTemplate", "Ext.layout.component.Dock"],
	alias : "widget.panel",
	alternateClassName : "Ext.Panel",
	collapsedCls : "collapsed",
	animCollapse : Ext.enableFx,
	minButtonWidth : 75,
	collapsed : false,
	collapseFirst : true,
	hideCollapseTool : false,
	titleCollapse : false,
	floatable : true,
	collapsible : false,
	closable : false,
	closeAction : "destroy",
	preventHeader : false,
	headerPosition : "top",
	frame : false,
	frameHeader : true,
	initComponent : function() {
		var b = this, a;
		b.addEvents("titlechange", "iconchange");
		if (b.unstyled) {
			b.setUI("plain")
		}
		if (b.frame) {
			b.setUI("default-framed")
		}
		b.callParent();
		b.collapseDirection = b.collapseDirection || b.headerPosition
				|| Ext.Component.DIRECTION_TOP;
		b.bridgeToolbars()
	},
	setBorder : function(a) {
		this.callParent(arguments)
	},
	beforeDestroy : function() {
		Ext.destroy(this.ghostPanel, this.dd);
		this.callParent()
	},
	initAria : function() {
		this.callParent();
		this.initHeaderAria()
	},
	initHeaderAria : function() {
		var b = this, a = b.el, c = b.header;
		if (a && c) {
			a.dom.setAttribute("aria-labelledby", c.titleCmp.id)
		}
	},
	getHeader : function() {
		return this.header
	},
	setTitle : function(c) {
		var b = this, a = this.title;
		b.title = c;
		if (b.header) {
			b.header.setTitle(c)
		} else {
			b.updateHeader()
		}
		if (b.reExpander) {
			b.reExpander.setTitle(c)
		}
		b.fireEvent("titlechange", b, c, a)
	},
	setIconCls : function(a) {
		var c = this, b = c.iconCls;
		c.iconCls = a;
		var d = c.header;
		if (d) {
			d.setIconCls(a)
		}
		c.fireEvent("iconchange", c, a, b)
	},
	bridgeToolbars : function() {
		var a = this, c, b, e = a.minButtonWidth;
		function d(f, g) {
			if (Ext.isArray(f)) {
				f = {
					xtype : "toolbar",
					items : f
				}
			} else {
				if (!f.xtype) {
					f.xtype = "toolbar"
				}
			}
			f.dock = g;
			if (g == "left" || g == "right") {
				f.vertical = true
			}
			return f
		}
		if (a.tbar) {
			a.addDocked(d(a.tbar, "top"));
			a.tbar = null
		}
		if (a.bbar) {
			a.addDocked(d(a.bbar, "bottom"));
			a.bbar = null
		}
		if (a.buttons) {
			a.fbar = a.buttons;
			a.buttons = null
		}
		if (a.fbar) {
			c = d(a.fbar, "bottom");
			c.ui = "footer";
			if (e) {
				b = c.defaults;
				c.defaults = function(f) {
					var g = b || {};
					if ((!f.xtype || f.xtype === "button" || (f.isComponent && f
							.isXType("button")))
							&& !("minWidth" in g)) {
						g = Ext.apply({
									minWidth : e
								}, g)
					}
					return g
				}
			}
			c = a.addDocked(c)[0];
			c.insert(0, {
						flex : 1,
						xtype : "component",
						focusable : false
					});
			a.fbar = null
		}
		if (a.lbar) {
			a.addDocked(d(a.lbar, "left"));
			a.lbar = null
		}
		if (a.rbar) {
			a.addDocked(d(a.rbar, "right"));
			a.rbar = null
		}
	},
	initTools : function() {
		var a = this;
		a.tools = a.tools || [];
		if (a.collapsible && !(a.hideCollapseTool || a.header === false)) {
			a.collapseDirection = a.collapseDirection || a.headerPosition
					|| "top";
			a.collapseTool = a.expandTool = a.createComponent({
						xtype : "tool",
						type : "collapse-" + a.collapseDirection,
						expandType : a
								.getOppositeDirection(a.collapseDirection),
						handler : a.toggleCollapse,
						scope : a
					});
			if (a.collapseFirst) {
				a.tools.unshift(a.collapseTool)
			}
		}
		a.addTools();
		if (a.closable) {
			a.addClsWithUI("closable");
			a.addTool({
						type : "close",
						handler : Ext.Function.bind(a.close, this, [])
					})
		}
		if (a.collapseTool && !a.collapseFirst) {
			a.tools.push(a.collapseTool)
		}
	},
	addTools : Ext.emptyFn,
	close : function() {
		if (this.fireEvent("beforeclose", this) !== false) {
			this.doClose()
		}
	},
	doClose : function() {
		this.fireEvent("close", this);
		this[this.closeAction]()
	},
	onRender : function(b, a) {
		var d = this, c;
		d.initTools();
		d.updateHeader();
		if (d.collapsed) {
			d.collapsed = false;
			c = d.findLayoutController();
			if (!d.hidden && c) {
				c.on({
							afterlayout : function() {
								d.collapse(null, false, true)
							},
							single : true
						})
			} else {
				d.afterComponentLayout = function() {
					delete d.afterComponentLayout;
					Ext.getClass(d).prototype.afterComponentLayout.apply(d,
							arguments);
					d.collapse(null, false, true)
				}
			}
		}
		d.callParent(arguments)
	},
	updateHeader : function(b) {
		var a = this, e = a.header, d = a.title, c = a.tools;
		if (!a.preventHeader && (b || d || (c && c.length))) {
			if (!e) {
				e = a.header = Ext.create("Ext.panel.Header", {
					title : d,
					orientation : (a.headerPosition == "left" || a.headerPosition == "right")
							? "vertical"
							: "horizontal",
					dock : a.headerPosition || "top",
					textCls : a.headerTextCls,
					iconCls : a.iconCls,
					baseCls : a.baseCls + "-header",
					tools : c,
					ui : a.ui,
					indicateDrag : a.draggable,
					border : a.border,
					frame : a.frame && a.frameHeader,
					ignoreParentFrame : a.frame || a.overlapHeader,
					ignoreBorderManagement : a.frame
							|| a.ignoreHeaderBorderManagement,
					listeners : a.collapsible && a.titleCollapse ? {
						click : a.toggleCollapse,
						scope : a
					} : null
				});
				a.addDocked(e, 0);
				a.tools = e.tools
			}
			e.show();
			a.initHeaderAria()
		} else {
			if (e) {
				e.hide()
			}
		}
	},
	setUI : function(b) {
		var a = this;
		a.callParent(arguments);
		if (a.header) {
			a.header.setUI(b)
		}
	},
	getContentTarget : function() {
		return this.body
	},
	getTargetEl : function() {
		return this.body || this.frameBody || this.el
	},
	addTool : function(a) {
		this.tools.push(a);
		var b = this.header;
		if (b) {
			b.addTool(a)
		}
		this.updateHeader()
	},
	getOppositeDirection : function(a) {
		var b = Ext.Component;
		switch (a) {
			case b.DIRECTION_TOP :
				return b.DIRECTION_BOTTOM;
			case b.DIRECTION_RIGHT :
				return b.DIRECTION_LEFT;
			case b.DIRECTION_BOTTOM :
				return b.DIRECTION_TOP;
			case b.DIRECTION_LEFT :
				return b.DIRECTION_RIGHT
		}
	},
	collapse : function(u, f, h) {
		var v = this, t = Ext.Component, k = v.getHeight(), l = v.getWidth(), w, a = 0, q = v.dockedItems.items, r = q.length, p = 0, s, g, o = {
			from : {
				height : k,
				width : l
			},
			to : {
				height : k,
				width : l
			},
			listeners : {
				afteranimate : v.afterCollapse,
				scope : v
			},
			duration : Ext.Number.from(f, Ext.fx.Anim.prototype.duration)
		}, e, d, m, b, j, n;
		if (!u) {
			u = v.collapseDirection
		}
		if (h) {
			f = false
		} else {
			if (v.collapsed || v.fireEvent("beforecollapse", v, u, f) === false) {
				return false
			}
		}
		m = u;
		v.expandDirection = v.getOppositeDirection(u);
		v.hiddenDocked = [];
		switch (u) {
			case t.DIRECTION_TOP :
			case t.DIRECTION_BOTTOM :
				v.expandedSize = v.getHeight();
				d = "horizontal";
				n = "height";
				b = "getHeight";
				j = "setHeight";
				for (; p < r; p++) {
					s = q[p];
					if (s.isVisible()) {
						if (s.isHeader
								&& (!s.dock || s.dock == "top" || s.dock == "bottom")) {
							e = s
						} else {
							v.hiddenDocked.push(s)
						}
					}
				}
				if (u == Ext.Component.DIRECTION_BOTTOM) {
					g = v.getPosition()[1]
							- Ext.fly(v.el.dom.offsetParent).getRegion().top;
					o.from.top = g
				}
				break;
			case t.DIRECTION_LEFT :
			case t.DIRECTION_RIGHT :
				v.expandedSize = v.getWidth();
				d = "vertical";
				n = "width";
				b = "getWidth";
				j = "setWidth";
				for (; p < r; p++) {
					s = q[p];
					if (s.isVisible()) {
						if (s.isHeader
								&& (s.dock == "left" || s.dock == "right")) {
							e = s
						} else {
							v.hiddenDocked.push(s)
						}
					}
				}
				if (u == Ext.Component.DIRECTION_RIGHT) {
					g = v.getPosition()[0]
							- Ext.fly(v.el.dom.offsetParent).getRegion().left;
					o.from.left = g
				}
				break;
			default :
				throw ("Panel collapse must be passed a valid Component collapse direction")
		}
		v.setAutoScroll(false);
		v.suspendLayout = true;
		v.body.setVisibilityMode(Ext.core.Element.DISPLAY);
		if (f && v.collapseTool) {
			v.collapseTool.disable()
		}
		v.addClsWithUI(v.collapsedCls);
		if (e) {
			e.addClsWithUI(v.collapsedCls);
			e.addClsWithUI(v.collapsedCls + "-" + e.dock);
			if (v.border
					&& (!v.frame || (v.frame && Ext.supports.CSS3BorderRadius))) {
				e.addClsWithUI(v.collapsedCls + "-border-" + e.dock)
			}
			w = e.getFrameInfo();
			a = e[b]() + (w ? w[u] : 0);
			e.removeClsWithUI(v.collapsedCls);
			e.removeClsWithUI(v.collapsedCls + "-" + e.dock);
			if (v.border
					&& (!v.frame || (v.frame && Ext.supports.CSS3BorderRadius))) {
				e.removeClsWithUI(v.collapsedCls + "-border-" + e.dock)
			}
		} else {
			e = {
				hideMode : "offsets",
				temporary : true,
				title : v.title,
				orientation : d,
				dock : m,
				textCls : v.headerTextCls,
				iconCls : v.iconCls,
				baseCls : v.baseCls + "-header",
				ui : v.ui,
				frame : v.frame && v.frameHeader,
				ignoreParentFrame : v.frame || v.overlapHeader,
				indicateDrag : v.draggable,
				cls : v.baseCls + "-collapsed-placeholder  "
						+ Ext.baseCSSPrefix + "docked " + v.baseCls + "-"
						+ v.ui + "-collapsed",
				renderTo : v.el
			};
			e[(e.orientation == "horizontal") ? "tools" : "items"] = [{
						xtype : "tool",
						type : "expand-" + v.expandDirection,
						handler : v.toggleCollapse,
						scope : v
					}];
			e = v.reExpander = Ext.create("Ext.panel.Header", e);
			a = e[b]() + ((e.frame) ? e.frameSize[u] : 0);
			e.hide();
			v.insertDocked(0, e)
		}
		v.reExpander = e;
		v.reExpander.addClsWithUI(v.collapsedCls);
		v.reExpander.addClsWithUI(v.collapsedCls + "-" + e.dock);
		if (v.border
				&& (!v.frame || (v.frame && Ext.supports.CSS3BorderRadius))) {
			v.reExpander.addClsWithUI(v.collapsedCls + "-border-"
					+ v.reExpander.dock)
		}
		if (u == Ext.Component.DIRECTION_RIGHT) {
			o.to.left = g + (l - a)
		} else {
			if (u == Ext.Component.DIRECTION_BOTTOM) {
				o.to.top = g + (k - a)
			}
		}
		o.to[n] = a;
		v.savedFlex = v.flex;
		v.savedMinWidth = v.minWidth;
		v.savedMinHeight = v.minHeight;
		v.minWidth = 0;
		v.minHeight = 0;
		delete v.flex;
		if (f) {
			v.animate(o)
		} else {
			v.setSize(o.to.width, o.to.height);
			if (Ext.isDefined(o.to.left) || Ext.isDefined(o.to.top)) {
				v.setPosition(o.to.left, o.to.top)
			}
			v.afterCollapse(false, h)
		}
		return v
	},
	afterCollapse : function(e, b) {
		var d = this, c = 0, a = d.hiddenDocked.length;
		d.minWidth = d.savedMinWidth;
		d.minHeight = d.savedMinHeight;
		d.body.hide();
		for (; c < a; c++) {
			d.hiddenDocked[c].hide()
		}
		if (d.reExpander) {
			d.reExpander.updateFrame();
			d.reExpander.show()
		}
		d.collapsed = true;
		if (!b) {
			d.doComponentLayout()
		}
		if (d.resizer) {
			d.resizer.disable()
		}
		if (d.collapseTool) {
			d.collapseTool.setType("expand-" + d.expandDirection)
		}
		if (!b) {
			d.fireEvent("collapse", d)
		}
		if (e && d.collapseTool) {
			d.collapseTool.enable()
		}
	},
	expand : function(b) {
		if (!this.collapsed
				|| this.fireEvent("beforeexpand", this, b) === false) {
			return false
		}
		var f = this, e = 0, c = f.hiddenDocked.length, j = f.expandDirection, k = f
				.getHeight(), a = f.getWidth(), g, d, h;
		if (b && f.collapseTool) {
			f.collapseTool.disable()
		}
		for (; e < c; e++) {
			f.hiddenDocked[e].hidden = false;
			f.hiddenDocked[e].el.show()
		}
		if (f.reExpander) {
			if (f.reExpander.temporary) {
				f.reExpander.hide()
			} else {
				f.reExpander.removeClsWithUI(f.collapsedCls);
				f.reExpander.removeClsWithUI(f.collapsedCls + "-"
						+ f.reExpander.dock);
				if (f.border
						&& (!f.frame || (f.frame && Ext.supports.CSS3BorderRadius))) {
					f.reExpander.removeClsWithUI(f.collapsedCls + "-border-"
							+ f.reExpander.dock)
				}
				f.reExpander.updateFrame()
			}
		}
		if (f.collapseTool) {
			f.collapseTool.setType("collapse-" + f.collapseDirection)
		}
		f.collapsed = false;
		f.body.show();
		f.removeClsWithUI(f.collapsedCls);
		d = {
			to : {},
			from : {
				height : k,
				width : a
			},
			listeners : {
				afteranimate : f.afterExpand,
				scope : f
			}
		};
		if ((j == Ext.Component.DIRECTION_TOP)
				|| (j == Ext.Component.DIRECTION_BOTTOM)) {
			if (f.autoHeight) {
				f.setCalculatedSize(f.width, null);
				d.to.height = f.getHeight();
				f.setCalculatedSize(f.width, d.from.height)
			} else {
				if (f.savedFlex) {
					f.flex = f.savedFlex;
					d.to.height = f.ownerCt.layout.calculateChildBox(f).height;
					delete f.flex
				} else {
					d.to.height = f.expandedSize
				}
			}
			if (j == Ext.Component.DIRECTION_TOP) {
				g = f.getPosition()[1]
						- Ext.fly(f.el.dom.offsetParent).getRegion().top;
				d.from.top = g;
				d.to.top = g - (d.to.height - k)
			}
		} else {
			if ((j == Ext.Component.DIRECTION_LEFT)
					|| (j == Ext.Component.DIRECTION_RIGHT)) {
				if (f.autoWidth) {
					f.setCalculatedSize(null, f.height);
					d.to.width = f.getWidth();
					f.setCalculatedSize(d.from.width, f.height)
				} else {
					if (f.savedFlex) {
						f.flex = f.savedFlex;
						d.to.width = f.ownerCt.layout.calculateChildBox(f).width;
						delete f.flex
					} else {
						d.to.width = f.expandedSize
					}
				}
				if (j == Ext.Component.DIRECTION_LEFT) {
					g = f.getPosition()[0]
							- Ext.fly(f.el.dom.offsetParent).getRegion().left;
					d.from.left = g;
					d.to.left = g - (d.to.width - a)
				}
			}
		}
		if (b) {
			f.animate(d)
		} else {
			f.setSize(d.to.width, d.to.height);
			if (d.to.x) {
				f.setLeft(d.to.x)
			}
			if (d.to.y) {
				f.setTop(d.to.y)
			}
			f.afterExpand(false)
		}
		return f
	},
	afterExpand : function(b) {
		var a = this;
		a.setAutoScroll(a.initialConfig.autoScroll);
		if (a.savedFlex) {
			a.flex = a.savedFlex;
			delete a.savedFlex;
			delete a.width;
			delete a.height
		}
		delete a.suspendLayout;
		if (b && a.ownerCt) {
			a.ownerCt.doLayout()
		}
		if (a.resizer) {
			a.resizer.enable()
		}
		a.fireEvent("expand", a);
		if (b && a.collapseTool) {
			a.collapseTool.enable()
		}
	},
	toggleCollapse : function() {
		if (this.collapsed) {
			this.expand(this.animCollapse)
		} else {
			this.collapse(this.collapseDirection, this.animCollapse)
		}
		return this
	},
	getKeyMap : function() {
		if (!this.keyMap) {
			this.keyMap = Ext.create("Ext.util.KeyMap", this.el, this.keys)
		}
		return this.keyMap
	},
	initDraggable : function() {
		this.dd = Ext.create("Ext.panel.DD", this, Ext
						.isBoolean(this.draggable) ? null : this.draggable)
	},
	ghostTools : function() {
		var b = [], a = this.initialConfig.tools;
		if (a) {
			Ext.each(a, function(c) {
						b.push({
									type : c.type
								})
					})
		} else {
			b = [{
						type : "placeholder"
					}]
		}
		return b
	},
	ghost : function(a) {
		var d = this, b = d.ghostPanel, c = d.getBox();
		if (!b) {
			b = Ext.create("Ext.panel.Panel", {
						renderTo : document.body,
						floating : {
							shadow : false
						},
						frame : Ext.supports.CSS3BorderRadius ? d.frame : false,
						title : d.title,
						overlapHeader : d.overlapHeader,
						headerPosition : d.headerPosition,
						width : d.getWidth(),
						height : d.getHeight(),
						iconCls : d.iconCls,
						baseCls : d.baseCls,
						tools : d.ghostTools(),
						cls : d.baseCls + "-ghost " + (a || "")
					});
			d.ghostPanel = b
		}
		b.floatParent = d.floatParent;
		if (d.floating) {
			b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"), 0))
		} else {
			b.toFront()
		}
		b.el.show();
		b.setPosition(c.x, c.y);
		b.setSize(c.width, c.height);
		d.el.hide();
		if (d.floatingItems) {
			d.floatingItems.hide()
		}
		return b
	},
	unghost : function(b, a) {
		var c = this;
		if (!c.ghostPanel) {
			return
		}
		if (b !== false) {
			c.el.show();
			if (a !== false) {
				c.setPosition(c.ghostPanel.getPosition())
			}
			if (c.floatingItems) {
				c.floatingItems.show()
			}
			Ext.defer(c.focus, 10, c)
		}
		c.ghostPanel.el.hide()
	},
	initResizable : function(a) {
		if (this.collapsed) {
			a.disabled = true
		}
		this.callParent([a])
	}
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.Desktop", {
	extend : "Ext.panel.Panel",
	alias : "widget.desktop",
	uses : ["Ext.util.MixedCollection", "Ext.menu.Menu", "Ext.view.View",
			"Ext.window.Window", "Ext.ux.desktop.TaskBar",
			"Ext.ux.desktop.Wallpaper", "Ext.ux.desktop.FitAllLayout"],
	activeWindowCls : "ux-desktop-active-win",
	inactiveWindowCls : "ux-desktop-inactive-win",
	lastActiveWindow : null,
	border : false,
	html : "&#160;",
	layout : "fitall",
	xTickSize : 1,
	yTickSize : 1,
	app : null,
	shortcuts : null,
	shortcutItemSelector : "div.ux-desktop-shortcut",
	shortcutTpl : ['<tpl for=".">',
			'<div class="ux-desktop-shortcut" id="{name}-shortcut">',
			'<div class="ux-desktop-shortcut-icon {iconCls}">', '<img src="',
			Ext.BLANK_IMAGE_URL, '" title="{name}">', "</div>",
			'<span class="ux-desktop-shortcut-text">{name}</span>', "</div>",
			"</tpl>", '<div class="x-clear"></div>'],
	taskbarConfig : null,
	windowMenu : null,
	initComponent : function() {
		var b = this;
		b.windowMenu = new Ext.menu.Menu(b.createWindowMenu());
		b.bbar = b.taskbar = new Ext.ux.desktop.TaskBar(b.taskbarConfig);
		b.taskbar.windowMenu = b.windowMenu;
		b.windows = new Ext.util.MixedCollection();
		b.contextMenu = new Ext.menu.Menu(b.createDesktopMenu());
		b.items = [{
					xtype : "wallpaper",
					id : b.id + "_wallpaper"
				}, b.createDataView()];
		b.callParent();
		b.shortcutsView = b.items.getAt(1);
		b.shortcutsView.on("itemclick", b.onShortcutItemClick, b);
		var a = b.wallpaper;
		b.wallpaper = b.items.getAt(0);
		if (a) {
			b.setWallpaper(a, b.wallpaperStretch)
		}
	},
	afterRender : function() {
		var a = this;
		a.callParent();
		a.el.on("contextmenu", a.onDesktopMenu, a)
	},
	createDataView : function() {
		var a = this;
		return {
			xtype : "dataview",
			overItemCls : "x-view-over",
			trackOver : true,
			itemSelector : a.shortcutItemSelector,
			store : a.shortcuts,
			tpl : new Ext.XTemplate(a.shortcutTpl)
		}
	},
	createDesktopMenu : function() {
		var b = this, a = {
			items : b.contextMenuItems || []
		};
		if (a.items.length) {
			a.items.push("-")
		}
		a.items.push({
					text : "Tile",
					handler : b.tileWindows,
					scope : b,
					minWindows : 1
				}, {
					text : "Cascade",
					handler : b.cascadeWindows,
					scope : b,
					minWindows : 1
				});
		return a
	},
	createWindowMenu : function() {
		var a = this;
		return {
			defaultAlign : "br-tr",
			items : [{
						text : "Restore",
						handler : a.onWindowMenuRestore,
						scope : a
					}, {
						text : "Minimize",
						handler : a.onWindowMenuMinimize,
						scope : a
					}, {
						text : "Maximize",
						handler : a.onWindowMenuMaximize,
						scope : a
					}, "-", {
						text : "Close",
						handler : a.onWindowMenuClose,
						scope : a
					}],
			listeners : {
				beforeshow : a.onWindowMenuBeforeShow,
				hide : a.onWindowMenuHide,
				scope : a
			}
		}
	},
	onDesktopMenu : function(b) {
		var a = this, c = a.contextMenu;
		b.stopEvent();
		if (!c.rendered) {
			c.on("beforeshow", a.onDesktopMenuBeforeShow, a)
		}
		c.showAt(b.getXY());
		c.doConstrain()
	},
	onDesktopMenuBeforeShow : function(c) {
		var b = this, a = b.windows.getCount();
		c.items.each(function(e) {
					var d = e.minWindows || 0;
					e.setDisabled(a < d)
				})
	},
	onShortcutItemClick : function(e, a) {
		var c = this, b = c.app.getModule(a.data.module), d = b
				&& b.createWindow();
		if (d) {
			c.restoreWindow(d)
		}
	},
	onWindowClose : function(b) {
		var a = this;
		a.windows.remove(b);
		a.taskbar.removeTaskButton(b.taskButton);
		a.updateActiveWindow()
	},
	onWindowMenuBeforeShow : function(c) {
		var a = c.items.items, b = c.theWin;
		a[0].setDisabled(b.maximized !== true && b.hidden !== true);
		a[1].setDisabled(b.minimized === true);
		a[2].setDisabled(b.maximized === true || b.hidden === true)
	},
	onWindowMenuClose : function() {
		var a = this, b = a.windowMenu.theWin;
		b.close()
	},
	onWindowMenuHide : function(a) {
		a.theWin = null
	},
	onWindowMenuMaximize : function() {
		var a = this, b = a.windowMenu.theWin;
		b.maximize()
	},
	onWindowMenuMinimize : function() {
		var a = this, b = a.windowMenu.theWin;
		b.minimize()
	},
	onWindowMenuRestore : function() {
		var a = this, b = a.windowMenu.theWin;
		a.restoreWindow(b)
	},
	getWallpaper : function() {
		return this.wallpaper.wallpaper
	},
	setTickSize : function(b, c) {
		var e = this, a = e.xTickSize = b, d = e.yTickSize = (arguments.length > 1)
				? c
				: a;
		e.windows.each(function(g) {
					var f = g.dd, h = g.resizer;
					f.xTickSize = a;
					f.yTickSize = d;
					h.widthIncrement = a;
					h.heightIncrement = d
				})
	},
	setWallpaper : function(b, a) {
		this.wallpaper.setWallpaper(b, a);
		return this
	},
	cascadeWindows : function() {
		var a = 0, c = 0, b = this.getDesktopZIndexManager();
		b.eachBottomUp(function(d) {
					if (d.isWindow && d.isVisible() && !d.maximized) {
						d.setPosition(a, c);
						a += 20;
						c += 20
					}
				})
	},
	createWindow : function(c, b) {
		var d = this, e, a = Ext.applyIf(c || {}, {
					stateful : false,
					isWindow : true,
					constrainHeader : true,
					minimizable : true,
					maximizable : true
				});
		b = b || Ext.window.Window;
		e = d.add(new b(a));
		d.windows.add(e);
		e.taskButton = d.taskbar.addTaskButton(e);
		e.animateTarget = e.taskButton.el;
		e.on({
					activate : d.updateActiveWindow,
					beforeshow : d.updateActiveWindow,
					deactivate : d.updateActiveWindow,
					minimize : d.minimizeWindow,
					destroy : d.onWindowClose,
					scope : d
				});
		e.on({
					afterrender : function() {
						e.dd.xTickSize = d.xTickSize;
						e.dd.yTickSize = d.yTickSize;
						if (e.resizer) {
							e.resizer.widthIncrement = d.xTickSize;
							e.resizer.heightIncrement = d.yTickSize
						}
					},
					single : true
				});
		e.doClose = function() {
			e.el.disableShadow();
			e.el.fadeOut({
						listeners : {
							afteranimate : function() {
								e.destroy()
							}
						}
					})
		};
		return e
	},
	getActiveWindow : function() {
		var b = null, a = this.getDesktopZIndexManager();
		if (a) {
			a.eachTopDown(function(c) {
						if (c.isWindow && !c.hidden) {
							b = c;
							return false
						}
						return true
					})
		}
		return b
	},
	getDesktopZIndexManager : function() {
		var a = this.windows;
		return (a.getCount() && a.getAt(0).zIndexManager) || null
	},
	getWindow : function(a) {
		return this.windows.get(a)
	},
	minimizeWindow : function(a) {
		a.minimized = true;
		a.hide()
	},
	restoreWindow : function(a) {
		if (a.isVisible()) {
			a.restore();
			a.toFront()
		} else {
			a.show()
		}
		return a
	},
	tileWindows : function() {
		var b = this, e = b.body.getWidth(true);
		var a = b.xTickSize, d = b.yTickSize, c = d;
		b.windows.each(function(g) {
					if (g.isVisible() && !g.maximized) {
						var f = g.el.getWidth();
						if (a > b.xTickSize && a + f > e) {
							a = b.xTickSize;
							d = c
						}
						g.setPosition(a, d);
						a += f + b.xTickSize;
						c = Math.max(c, d + g.el.getHeight() + b.yTickSize)
					}
				})
	},
	updateActiveWindow : function() {
		var b = this, c = b.getActiveWindow(), a = b.lastActiveWindow;
		if (c === a) {
			return
		}
		if (a) {
			if (a.el.dom) {
				a.addCls(b.inactiveWindowCls);
				a.removeCls(b.activeWindowCls)
			}
			a.active = false
		}
		b.lastActiveWindow = c;
		if (c) {
			c.addCls(b.activeWindowCls);
			c.removeCls(b.inactiveWindowCls);
			c.minimized = false;
			c.active = true
		}
		b.taskbar.setActiveButton(c && c.taskButton)
	}
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.App", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			requires : ["Ext.container.Viewport", "Ext.ux.desktop.Desktop"],
			isReady : false,
			modules : null,
			useQuickTips : true,
			constructor : function(a) {
				var b = this;
				b.addEvents("ready", "beforeunload");
				b.mixins.observable.constructor.call(this, a);
				if (Ext.isReady) {
					Ext.Function.defer(b.init, 10, b)
				} else {
					Ext.onReady(b.init, b)
				}
			},
			init : function() {
				var b = this, a;
				if (b.useQuickTips) {
					Ext.QuickTips.init()
				}
				b.modules = b.getModules();
				if (b.modules) {
					b.initModules(b.modules)
				}
				a = b.getDesktopConfig();
				b.desktop = new Ext.ux.desktop.Desktop(a);
				b.viewport = new Ext.container.Viewport({
							layout : "fit",
							items : [b.desktop]
						});
				Ext.EventManager.on(window, "beforeunload", b.onUnload, b);
				b.isReady = true;
				b.fireEvent("ready", b)
			},
			getDesktopConfig : function() {
				var b = this, a = {
					app : b,
					taskbarConfig : b.getTaskbarConfig()
				};
				Ext.apply(a, b.desktopConfig);
				return a
			},
			getModules : Ext.emptyFn,
			getStartConfig : function() {
				var b = this, a = {
					app : b,
					menu : []
				};
				Ext.apply(a, b.startConfig);
				Ext.each(b.modules, function(c) {
							if (c.launcher) {
								a.menu.push(c.launcher)
							}
						});
				return a
			},
			getTaskbarConfig : function() {
				var b = this, a = {
					app : b,
					startConfig : b.getStartConfig()
				};
				Ext.apply(a, b.taskbarConfig);
				return a
			},
			initModules : function(a) {
				var b = this;
				Ext.each(a, function(c) {
							c.app = b
						})
			},
			getModule : function(d) {
				var c = this.modules;
				for (var e = 0, b = c.length; e < b; e++) {
					var a = c[e];
					if (a.id == d || a.appType == d) {
						return a
					}
				}
				return null
			},
			onReady : function(b, a) {
				if (this.isReady) {
					b.call(a, this)
				} else {
					this.on({
								ready : b,
								scope : a,
								single : true
							})
				}
			},
			getDesktop : function() {
				return this.desktop
			},
			onUnload : function(a) {
				if (this.fireEvent("beforeunload", this) === false) {
					a.stopEvent()
				}
			}
		});
Ext.define("Ext.window.Window", {
	extend : "Ext.panel.Panel",
	alternateClassName : "Ext.Window",
	requires : ["Ext.util.ComponentDragger", "Ext.util.Region",
			"Ext.EventManager"],
	alias : "widget.window",
	baseCls : Ext.baseCSSPrefix + "window",
	resizable : true,
	draggable : true,
	constrain : false,
	constrainHeader : false,
	plain : false,
	minimizable : false,
	maximizable : false,
	minHeight : 100,
	minWidth : 200,
	expandOnShow : true,
	collapsible : false,
	closable : true,
	hidden : true,
	autoRender : true,
	hideMode : "visibility",
	floating : true,
	ariaRole : "alertdialog",
	itemCls : "x-window-item",
	overlapHeader : true,
	ignoreHeaderBorderManagement : true,
	initComponent : function() {
		var a = this;
		a.callParent();
		a.addEvents("resize", "maximize", "minimize", "restore");
		if (a.plain) {
			a.addClsWithUI("plain")
		}
		if (a.modal) {
			a.ariaRole = "dialog"
		}
	},
	initStateEvents : function() {
		var a = this.stateEvents;
		Ext.each(["maximize", "restore", "resize", "dragend"], function(b) {
					if (Ext.Array.indexOf(a, b)) {
						a.push(b)
					}
				});
		this.callParent()
	},
	getState : function() {
		var b = this, c = b.callParent() || {}, a = !!b.maximized;
		c.maximized = a;
		Ext.apply(c, {
					size : a ? b.restoreSize : b.getSize(),
					pos : a ? b.restorePos : b.getPosition()
				});
		return c
	},
	applyState : function(b) {
		var a = this;
		if (b) {
			a.maximized = b.maximized;
			if (a.maximized) {
				a.hasSavedRestore = true;
				a.restoreSize = b.size;
				a.restorePos = b.pos
			} else {
				Ext.apply(a, {
							width : b.size.width,
							height : b.size.height,
							x : b.pos[0],
							y : b.pos[1]
						})
			}
		}
	},
	onMouseDown : function() {
		if (this.floating) {
			this.toFront()
		}
	},
	onRender : function(b, a) {
		var c = this;
		c.callParent(arguments);
		c.focusEl = c.el;
		if (c.maximizable) {
			c.header.on({
						dblclick : {
							fn : c.toggleMaximize,
							element : "el",
							scope : c
						}
					})
		}
	},
	afterRender : function() {
		var a = this, b = a.hidden, c;
		a.hidden = false;
		a.callParent();
		a.hidden = b;
		a.proxy = a.getProxy();
		a.mon(a.el, "mousedown", a.onMouseDown, a);
		if (a.maximized) {
			a.maximized = false;
			a.maximize()
		}
		if (a.closable) {
			c = a.getKeyMap();
			c.on(27, a.onEsc, a);
			c.disable()
		}
	},
	initDraggable : function() {
		var b = this, a;
		if (!b.header) {
			b.updateHeader(true)
		}
		a = Ext.applyIf({
					el : b.el,
					delegate : "#" + b.header.id
				}, b.draggable);
		if (b.constrain || b.constrainHeader) {
			a.constrain = b.constrain;
			a.constrainDelegate = b.constrainHeader;
			a.constrainTo = b.constrainTo || b.container
		}
		b.dd = Ext.create("Ext.util.ComponentDragger", this, a);
		b.relayEvents(b.dd, ["dragstart", "drag", "dragend"])
	},
	onEsc : function(a, b) {
		b.stopEvent();
		this[this.closeAction]()
	},
	beforeDestroy : function() {
		var a = this;
		if (a.rendered) {
			delete this.animateTarget;
			a.hide();
			Ext.destroy(a.keyMap)
		}
		a.callParent()
	},
	addTools : function() {
		var a = this;
		a.callParent();
		if (a.minimizable) {
			a.addTool({
						type : "minimize",
						handler : Ext.Function.bind(a.minimize, a, [])
					})
		}
		if (a.maximizable) {
			a.addTool({
						type : "maximize",
						handler : Ext.Function.bind(a.maximize, a, [])
					});
			a.addTool({
						type : "restore",
						handler : Ext.Function.bind(a.restore, a, []),
						hidden : true
					})
		}
	},
	getFocusEl : function() {
		var d = this, g = d.focusEl, e = d.defaultButton || d.defaultFocus, b = typeof db, c, a;
		if (Ext.isDefined(e)) {
			if (Ext.isNumber(e)) {
				g = d.query("button")[e]
			} else {
				if (Ext.isString(e)) {
					g = d.down("#" + e)
				} else {
					g = e
				}
			}
		}
		return g || d.focusEl
	},
	beforeShow : function() {
		this.callParent();
		if (this.expandOnShow) {
			this.expand(false)
		}
	},
	afterShow : function(c) {
		var b = this, a;
		b.callParent(arguments);
		if (b.maximized) {
			b.fitContainer()
		}
		if (b.monitorResize || b.constrain || b.constrainHeader) {
			Ext.EventManager.onWindowResize(b.onWindowResize, b)
		}
		b.doConstrain();
		if (b.keyMap) {
			b.keyMap.enable()
		}
	},
	doClose : function() {
		var a = this;
		if (a.hidden) {
			a.fireEvent("close", a);
			a[a.closeAction]()
		} else {
			a.hide(a.animTarget, a.doClose, a)
		}
	},
	afterHide : function() {
		var a = this;
		if (a.monitorResize || a.constrain || a.constrainHeader) {
			Ext.EventManager.removeResizeListener(a.onWindowResize, a)
		}
		if (a.keyMap) {
			a.keyMap.disable()
		}
		a.callParent(arguments)
	},
	onWindowResize : function() {
		if (this.maximized) {
			this.fitContainer()
		}
		this.doConstrain()
	},
	minimize : function() {
		this.fireEvent("minimize", this);
		return this
	},
	afterCollapse : function() {
		var a = this;
		if (a.maximizable) {
			a.tools.maximize.hide();
			a.tools.restore.hide()
		}
		if (a.resizer) {
			a.resizer.disable()
		}
		a.callParent(arguments)
	},
	afterExpand : function() {
		var a = this;
		if (a.maximized) {
			a.tools.restore.show()
		} else {
			if (a.maximizable) {
				a.tools.maximize.show()
			}
		}
		if (a.resizer) {
			a.resizer.enable()
		}
		a.callParent(arguments)
	},
	maximize : function() {
		var a = this;
		if (!a.maximized) {
			a.expand(false);
			if (!a.hasSavedRestore) {
				a.restoreSize = a.getSize();
				a.restorePos = a.getPosition(true)
			}
			if (a.maximizable) {
				a.tools.maximize.hide();
				a.tools.restore.show()
			}
			a.maximized = true;
			a.el.disableShadow();
			if (a.dd) {
				a.dd.disable()
			}
			if (a.collapseTool) {
				a.collapseTool.hide()
			}
			a.el.addCls(Ext.baseCSSPrefix + "window-maximized");
			a.container.addCls(Ext.baseCSSPrefix + "window-maximized-ct");
			a.setPosition(0, 0);
			a.fitContainer();
			a.fireEvent("maximize", a)
		}
		return a
	},
	restore : function() {
		var a = this, b = a.tools;
		if (a.maximized) {
			delete a.hasSavedRestore;
			a.removeCls(Ext.baseCSSPrefix + "window-maximized");
			if (b.restore) {
				b.restore.hide()
			}
			if (b.maximize) {
				b.maximize.show()
			}
			if (a.collapseTool) {
				a.collapseTool.show()
			}
			a.setPosition(a.restorePos);
			a.setSize(a.restoreSize);
			delete a.restorePos;
			delete a.restoreSize;
			a.maximized = false;
			a.el.enableShadow(true);
			if (a.dd) {
				a.dd.enable()
			}
			a.container.removeCls(Ext.baseCSSPrefix + "window-maximized-ct");
			a.doConstrain();
			a.fireEvent("restore", a)
		}
		return a
	},
	toggleMaximize : function() {
		return this[this.maximized ? "restore" : "maximize"]()
	}
});
Ext.define("Ext.window.MessageBox", {
	extend : "Ext.window.Window",
	requires : ["Ext.toolbar.Toolbar", "Ext.form.field.Text",
			"Ext.form.field.TextArea", "Ext.button.Button",
			"Ext.layout.container.Anchor", "Ext.layout.container.HBox",
			"Ext.ProgressBar"],
	alternateClassName : "Ext.MessageBox",
	alias : "widget.messagebox",
	OK : 1,
	YES : 2,
	NO : 4,
	CANCEL : 8,
	OKCANCEL : 9,
	YESNO : 6,
	YESNOCANCEL : 14,
	INFO : "ext-mb-info",
	WARNING : "ext-mb-warning",
	QUESTION : "ext-mb-question",
	ERROR : "ext-mb-error",
	hideMode : "offsets",
	closeAction : "hide",
	resizable : false,
	title : "&#160;",
	width : 600,
	height : 500,
	minWidth : 250,
	maxWidth : 600,
	minHeight : 110,
	maxHeight : 500,
	constrain : true,
	cls : Ext.baseCSSPrefix + "message-box",
	layout : {
		type : "anchor"
	},
	defaultTextHeight : 75,
	minProgressWidth : 250,
	minPromptWidth : 250,
	buttonText : {
		ok : "OK",
		yes : "Yes",
		no : "No",
		cancel : "Cancel"
	},
	buttonIds : ["ok", "yes", "no", "cancel"],
	titleText : {
		confirm : "Confirm",
		prompt : "Prompt",
		wait : "Loading...",
		alert : "Attention"
	},
	iconHeight : 35,
	makeButton : function(a) {
		var b = this.buttonIds[a];
		return Ext.create("Ext.button.Button", {
					handler : this.btnCallback,
					itemId : b,
					scope : this,
					text : this.buttonText[b],
					minWidth : 75
				})
	},
	btnCallback : function(a) {
		var b = this, c, d;
		if (b.cfg.prompt || b.cfg.multiline) {
			if (b.cfg.multiline) {
				d = b.textArea
			} else {
				d = b.textField
			}
			c = d.getValue();
			d.reset()
		}
		a.blur();
		b.hide();
		b.userCallback(a.itemId, c, b.cfg)
	},
	hide : function() {
		var a = this;
		a.dd.endDrag();
		a.progressBar.reset();
		a.removeCls(a.cfg.cls);
		a.callParent()
	},
	initComponent : function() {
		var c = this, b, a;
		c.title = "&#160;";
		c.topContainer = Ext.create("Ext.container.Container", {
			anchor : "100%",
			style : {
				padding : "10px",
				overflow : "hidden"
			},
			items : [c.iconComponent = Ext.create("Ext.Component", {
								cls : "ext-mb-icon",
								width : 50,
								height : c.iconHeight,
								style : {
									"float" : "left"
								}
							}),
					c.promptContainer = Ext.create("Ext.container.Container", {
								layout : {
									type : "anchor"
								},
								items : [
										c.msg = Ext.create("Ext.Component", {
													autoEl : {
														tag : "span"
													},
													cls : "ext-mb-text"
												}),
										c.textField = Ext.create(
												"Ext.form.field.Text", {
													anchor : "100%",
													enableKeyEvents : true,
													listeners : {
														keydown : c.onPromptKey,
														scope : c
													}
												}),
										c.textArea = Ext.create(
												"Ext.form.field.TextArea", {
													anchor : "100%",
													height : 75
												})]
							})]
		});
		c.progressBar = Ext.create("Ext.ProgressBar", {
					anchor : "-10",
					style : "margin-left:10px"
				});
		c.items = [c.topContainer, c.progressBar];
		c.msgButtons = [];
		for (b = 0; b < 4; b++) {
			a = c.makeButton(b);
			c.msgButtons[a.itemId] = a;
			c.msgButtons.push(a)
		}
		c.bottomTb = Ext.create("Ext.toolbar.Toolbar", {
					ui : "footer",
					dock : "bottom",
					layout : {
						pack : "center"
					},
					items : [c.msgButtons[0], c.msgButtons[1], c.msgButtons[2],
							c.msgButtons[3]]
				});
		c.dockedItems = [c.bottomTb];
		c.callParent()
	},
	onPromptKey : function(a, c) {
		var b = this, d;
		if (c.keyCode === Ext.EventObject.RETURN || c.keyCode === 10) {
			if (b.msgButtons.ok.isVisible()) {
				d = true;
				b.msgButtons.ok.handler.call(b, b.msgButtons.ok)
			} else {
				if (b.msgButtons.yes.isVisible()) {
					b.msgButtons.yes.handler.call(b, b.msgButtons.yes);
					d = true
				}
			}
			if (d) {
				b.textField.blur()
			}
		}
	},
	reconfigure : function(a) {
		var d = this, c = a.buttons || 0, f = true, e = d.maxWidth, b;
		a = a || {};
		d.cfg = a;
		if (a.width) {
			e = a.width
		}
		delete d.defaultFocus;
		d.animateTarget = a.animateTarget || undefined;
		d.modal = a.modal !== false;
		if (a.title) {
			d.setTitle(a.title || "&#160;")
		}
		if (!d.rendered) {
			d.width = e;
			d.render(Ext.getBody())
		} else {
			d.setSize(e, d.maxHeight)
		}
		d.setPosition(-10000, -10000);
		d.closable = a.closable && !a.wait;
		if (a.closable === false) {
			d.tools.close.hide()
		} else {
			d.tools.close.show()
		}
		if (!a.title && !d.closable) {
			d.header.hide()
		} else {
			d.header.show()
		}
		d.liveDrag = !a.proxyDrag;
		d.userCallback = Ext.Function.bind(a.callback || a.fn || Ext.emptyFn,
				a.scope || Ext.global);
		d.setIcon(a.icon);
		if (a.msg) {
			d.msg.update(a.msg);
			d.msg.show()
		} else {
			d.msg.hide()
		}
		if (a.prompt || a.multiline) {
			d.multiline = a.multiline;
			if (a.multiline) {
				d.textArea.setValue(a.value);
				d.textArea
						.setHeight(a.defaultTextHeight || d.defaultTextHeight);
				d.textArea.show();
				d.textField.hide();
				d.defaultFocus = d.textArea
			} else {
				d.textField.setValue(a.value);
				d.textArea.hide();
				d.textField.show();
				d.defaultFocus = d.textField
			}
		} else {
			d.textArea.hide();
			d.textField.hide()
		}
		if (a.progress || a.wait) {
			d.progressBar.show();
			d.updateProgress(0, a.progressText);
			if (a.wait === true) {
				d.progressBar.wait(a.waitConfig)
			}
		} else {
			d.progressBar.hide()
		}
		for (b = 0; b < 4; b++) {
			if (c & Math.pow(2, b)) {
				if (!d.defaultFocus) {
					d.defaultFocus = d.msgButtons[b]
				}
				d.msgButtons[b].show();
				f = false
			} else {
				d.msgButtons[b].hide()
			}
		}
		if (f) {
			d.bottomTb.hide()
		} else {
			d.bottomTb.show()
		}
		d.hidden = true
	},
	show : function(a) {
		var b = this;
		b.reconfigure(a);
		b.addCls(a.cls);
		if (a.animateTarget) {
			b.doAutoSize(false);
			b.callParent()
		} else {
			b.callParent();
			b.doAutoSize(true)
		}
		return b
	},
	afterShow : function() {
		if (this.animateTarget) {
			this.center()
		}
		this.callParent(arguments)
	},
	doAutoSize : function(b) {
		var e = this, d = e.iconComponent, f = e.iconHeight;
		if (!Ext.isDefined(e.frameWidth)) {
			e.frameWidth = e.el.getWidth() - e.body.getWidth()
		}
		d.setHeight(f);
		e.minWidth = e.cfg.minWidth || Ext.getClass(this).prototype.minWidth;
		e.topContainer.doLayout();
		if (Ext.isIE6 || Ext.isIEQuirks) {
			e.textField.setCalculatedSize(9);
			e.textArea.setCalculatedSize(9)
		}
		var c = e.cfg.width || e.msg.getWidth() + d.getWidth() + 25, a = (e.header.rendered
				? e.header.getHeight()
				: 0)
				+ Math.max(e.promptContainer.getHeight(), d.getHeight())
				+ e.progressBar.getHeight()
				+ (e.bottomTb.rendered ? e.bottomTb.getHeight() : 0) + 20;
		d.setHeight(Math.max(f, e.msg.getHeight()));
		e.setSize(c + e.frameWidth, a + e.frameWidth);
		if (b) {
			e.center()
		}
		return e
	},
	updateText : function(a) {
		this.msg.update(a);
		return this.doAutoSize(true)
	},
	setIcon : function(a) {
		var b = this;
		b.iconComponent.removeCls(b.iconCls);
		if (a) {
			b.iconComponent.show();
			b.iconComponent.addCls(Ext.baseCSSPrefix + "dlg-icon");
			b.iconComponent.addCls(b.iconCls = a)
		} else {
			b.iconComponent.removeCls(Ext.baseCSSPrefix + "dlg-icon");
			b.iconComponent.hide()
		}
		return b
	},
	updateProgress : function(b, a, c) {
		this.progressBar.updateProgress(b, a);
		if (c) {
			this.updateText(c)
		}
		return this
	},
	onEsc : function() {
		if (this.closable !== false) {
			this.callParent(arguments)
		}
	},
	confirm : function(a, d, c, b) {
		if (Ext.isString(a)) {
			a = {
				title : a,
				icon : "ext-mb-question",
				msg : d,
				buttons : this.YESNO,
				callback : c,
				scope : b
			}
		}
		return this.show(a)
	},
	prompt : function(b, f, d, c, a, e) {
		if (Ext.isString(b)) {
			b = {
				prompt : true,
				title : b,
				minWidth : this.minPromptWidth,
				msg : f,
				buttons : this.OKCANCEL,
				callback : d,
				scope : c,
				multiline : a,
				value : e
			}
		}
		return this.show(b)
	},
	wait : function(a, c, b) {
		if (Ext.isString(a)) {
			a = {
				title : c,
				msg : a,
				closable : false,
				wait : true,
				modal : true,
				minWidth : this.minProgressWidth,
				waitConfig : b
			}
		}
		return this.show(a)
	},
	alert : function(a, d, c, b) {
		if (Ext.isString(a)) {
			a = {
				title : a,
				msg : d,
				buttons : this.OK,
				fn : c,
				scope : b,
				minWidth : this.minWidth
			}
		}
		return this.show(a)
	},
	progress : function(a, c, b) {
		if (Ext.isString(a)) {
			a = {
				title : a,
				msg : c,
				progressText : b
			}
		}
		return this.show(a)
	}
}, function() {
	Ext.MessageBox = Ext.Msg = new this()
});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.Settings", {
			extend : "Ext.window.Window",
			uses : ["Ext.tree.Panel", "Ext.tree.View",
					"Ext.form.field.Checkbox", "Ext.layout.container.Anchor",
					"Ext.layout.container.Border", "Ext.ux.desktop.Wallpaper",
					"MyDesktop.WallpaperModel"],
			layout : "anchor",
			title : "Change Settings",
			modal : true,
			width : 640,
			height : 480,
			border : false,
			initComponent : function() {
				var a = this;
				a.selected = a.desktop.getWallpaper();
				a.stretch = a.desktop.wallpaper.stretch;
				a.preview = Ext.create("widget.wallpaper");
				a.preview.setWallpaper(a.selected);
				a.tree = a.createTree();
				a.buttons = [{
							text : "OK",
							handler : a.onOK,
							scope : a
						}, {
							text : "Cancel",
							handler : a.close,
							scope : a
						}];
				a.items = [{
							anchor : "0 -30",
							border : false,
							layout : "border",
							items : [a.tree, {
										xtype : "panel",
										title : "Preview",
										region : "center",
										layout : "fit",
										items : [a.preview]
									}]
						}, {
							xtype : "checkbox",
							boxLabel : "Stretch to fit",
							checked : a.stretch,
							listeners : {
								change : function(b) {
									a.stretch = b.checked
								}
							}
						}];
				a.callParent()
			},
			createTree : function() {
				var b = this;
				function c(d) {
					return {
						img : d,
						text : b.getTextOfWallpaper(d),
						iconCls : "",
						leaf : true
					}
				}
				var a = new Ext.tree.Panel({
							title : "Desktop Background",
							rootVisible : false,
							lines : false,
							autoScroll : true,
							width : 150,
							region : "west",
							split : true,
							minWidth : 100,
							listeners : {
								afterrender : {
									fn : this.setInitialSelection,
									delay : 100
								},
								select : this.onSelect,
								scope : this
							},
							store : new Ext.data.TreeStore({
										model : "MyDesktop.WallpaperModel",
										root : {
											text : "Wallpaper",
											expanded : true,
											children : [{
														text : "None",
														iconCls : "",
														leaf : true
													}, c("Blue-Sencha.jpg"),
													c("Dark-Sencha.jpg"),
													c("Wood-Sencha.jpg"),
													c("blue.jpg"),
													c("desk.jpg"),
													c("desktop.jpg"),
													c("desktop2.jpg"),
													c("sky.jpg")]
										}
									})
						});
				return a
			},
			getTextOfWallpaper : function(c) {
				var d = c, b = c.lastIndexOf("/");
				if (b >= 0) {
					d = d.substring(b + 1)
				}
				var a = d.lastIndexOf(".");
				d = Ext.String.capitalize(d.substring(0, a));
				d = d.replace(/[-]/g, " ");
				return d
			},
			onOK : function() {
				var a = this;
				if (a.selected) {
					a.desktop.setWallpaper(a.selected, a.stretch)
				}
				a.destroy()
			},
			onSelect : function(a, b) {
				var c = this;
				if (b.data.img) {
					c.selected = "wallpapers/" + b.data.img
				} else {
					c.selected = Ext.BLANK_IMAGE_URL
				}
				c.preview.setWallpaper(c.selected)
			},
			setInitialSelection : function() {
				var a = this.desktop.getWallpaper();
				if (a) {
					var b = "/Wallpaper/" + this.getTextOfWallpaper(a);
					this.tree.selectPath(b, "text")
				}
			}
		});
Ext.define("Ext.tab.Panel", {
			extend : "Ext.panel.Panel",
			alias : "widget.tabpanel",
			alternateClassName : ["Ext.TabPanel"],
			requires : ["Ext.layout.container.Card", "Ext.tab.Bar"],
			tabPosition : "top",
			removePanelHeader : true,
			plain : false,
			itemCls : "x-tabpanel-child",
			deferredRender : true,
			initComponent : function() {
				var c = this, b = c.dockedItems || [], a = c.activeTab || 0;
				c.layout = Ext.create("Ext.layout.container.Card", Ext.apply({
									owner : c,
									deferredRender : c.deferredRender,
									itemCls : c.itemCls
								}, c.layout));
				c.tabBar = Ext.create("Ext.tab.Bar", Ext.apply({}, c.tabBar, {
									dock : c.tabPosition,
									plain : c.plain,
									border : c.border,
									cardLayout : c.layout,
									tabPanel : c
								}));
				if (b && !Ext.isArray(b)) {
					b = [b]
				}
				b.push(c.tabBar);
				c.dockedItems = b;
				c.addEvents("beforetabchange", "tabchange");
				c.callParent(arguments);
				c.setActiveTab(a);
				c.on("afterlayout", c.afterInitialLayout, c, {
							single : true
						})
			},
			afterInitialLayout : function() {
				var b = this, a = b.getComponent(b.activeTab);
				if (a) {
					b.layout.setActiveItem(a)
				}
			},
			setActiveTab : function(a) {
				var c = this, b;
				a = c.getComponent(a);
				if (a) {
					b = c.getActiveTab();
					if (b
							&& b !== a
							&& c.fireEvent("beforetabchange", c, a, b) === false) {
						return false
					}
					c.tabBar.setActiveTab(a.tab);
					c.activeTab = a;
					if (c.rendered) {
						c.layout.setActiveItem(a)
					}
					if (b && b !== a) {
						c.fireEvent("tabchange", c, a, b)
					}
				}
			},
			getActiveTab : function() {
				return this.activeTab
			},
			getTabBar : function() {
				return this.tabBar
			},
			onAdd : function(c, a) {
				var b = this;
				c.tab = b.tabBar.insert(a, {
							xtype : "tab",
							card : c,
							disabled : c.disabled,
							closable : c.closable,
							hidden : c.hidden,
							tabBar : b.tabBar
						});
				c.on({
							scope : b,
							enable : b.onItemEnable,
							disable : b.onItemDisable,
							beforeshow : b.onItemBeforeShow,
							iconchange : b.onItemIconChange,
							titlechange : b.onItemTitleChange
						});
				if (c.isPanel) {
					if (b.removePanelHeader) {
						c.preventHeader = true;
						if (c.rendered) {
							c.updateHeader()
						}
					}
					if (c.isPanel && b.border) {
						c.setBorder(false)
					}
				}
				if (this.rendered && b.items.getCount() === 1) {
					b.setActiveTab(0)
				}
			},
			onItemEnable : function(a) {
				a.tab.enable()
			},
			onItemDisable : function(a) {
				a.tab.disable()
			},
			onItemBeforeShow : function(a) {
				if (a !== this.activeTab) {
					this.setActiveTab(a);
					return false
				}
			},
			onItemIconChange : function(b, a) {
				b.tab.setIconCls(a);
				this.getTabBar().doLayout()
			},
			onItemTitleChange : function(a, b) {
				a.tab.setText(b);
				this.getTabBar().doLayout()
			},
			doRemove : function(d, b) {
				var c = this, a = c.items, e = a.getCount() > 1;
				if (c.destroying || !e) {
					c.activeTab = null
				} else {
					if (d === c.activeTab) {
						c.setActiveTab(d.next() || a.getAt(0))
					}
				}
				c.callParent(arguments);
				delete d.tab.card;
				delete d.tab
			},
			onRemove : function(c, a) {
				var b = this;
				c.un({
							scope : b,
							enable : b.onItemEnable,
							disable : b.onItemDisable,
							beforeshow : b.onItemBeforeShow
						});
				if (!b.destroying && c.tab.ownerCt == b.tabBar) {
					b.tabBar.remove(c.tab)
				}
			}
		});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.TabWindow", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.tab.Panel"],
	id : "tab-win",
	init : function() {
		this.launcher = {
			text : "Tab Window",
			iconCls : "tabs",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("tab-win");
		if (!a) {
			a = b.createWindow({
				id : "tab-win",
				title : "Tab Window",
				width : 740,
				height : 480,
				iconCls : "tabs",
				animCollapse : false,
				border : false,
				constrainHeader : true,
				layout : "fit",
				items : [{
					xtype : "tabpanel",
					activeTab : 0,
					bodyStyle : "padding: 5px;",
					items : [{
								title : "Tab Text 1",
								header : false,
								html : "<p>Something useful would be in here.</p>",
								border : false
							}, {
								title : "Tab Text 2",
								header : false,
								html : "<p>Something useful would be in here.</p>",
								border : false
							}, {
								title : "Tab Text 3",
								header : false,
								html : "<p>Something useful would be in here.</p>",
								border : false
							}, {
								title : "Tab Text 4",
								header : false,
								html : "<p>Something useful would be in here.</p>",
								border : false
							}]
				}]
			})
		}
		a.show();
		return a
	}
});
Ext.define("Ext.panel.Table", {
	extend : "Ext.panel.Panel",
	alias : "widget.tablepanel",
	uses : ["Ext.selection.RowModel", "Ext.grid.Scroller",
			"Ext.grid.header.Container", "Ext.grid.Lockable"],
	cls : Ext.baseCSSPrefix + "grid",
	extraBodyCls : Ext.baseCSSPrefix + "grid-body",
	layout : "fit",
	hasView : false,
	viewType : null,
	selType : "rowmodel",
	scrollDelta : 40,
	scroll : true,
	sortableColumns : true,
	verticalScrollDock : "right",
	verticalScrollerType : "gridscroller",
	horizontalScrollerPresentCls : Ext.baseCSSPrefix
			+ "horizontal-scroller-present",
	verticalScrollerPresentCls : Ext.baseCSSPrefix
			+ "vertical-scroller-present",
	scrollerOwner : true,
	invalidateScrollerOnRefresh : true,
	enableColumnMove : true,
	enableColumnResize : true,
	initComponent : function() {
		var g = this, a = g.scroll, d = false, c = false, h = g.columns
				|| g.colModel, f = 0, b, e = g.border;
		g.determineScrollbars = Ext.Function.createBuffered(
				g.determineScrollbars, 30);
		g.injectView = Ext.Function.createBuffered(g.injectView, 30);
		if (g.hideHeaders) {
			e = false
		}
		if (h instanceof Ext.grid.header.Container) {
			g.headerCt = h;
			g.headerCt.border = e;
			g.columns = g.headerCt.items.items
		} else {
			if (Ext.isArray(h)) {
				h = {
					items : h,
					border : e
				}
			}
			Ext.apply(h, {
						forceFit : g.forceFit,
						sortable : g.sortableColumns,
						enableColumnMove : g.enableColumnMove,
						enableColumnResize : g.enableColumnResize,
						border : e
					});
			g.columns = h.items;
			if (Ext.ComponentQuery.query(
					"{locked !== undefined}{processed != true}", g.columns).length) {
				g.self.mixin("lockable", Ext.grid.Lockable);
				g.injectLockable()
			}
		}
		g.store = Ext.data.StoreManager.lookup(g.store);
		g.addEvents("scrollerhide", "scrollershow");
		g.bodyCls = g.bodyCls || "";
		g.bodyCls += (" " + g.extraBodyCls);
		delete g.autoScroll;
		if (!g.hasView) {
			if (!g.headerCt) {
				g.headerCt = Ext.create("Ext.grid.header.Container", h)
			}
			g.columns = g.headerCt.items.items;
			if (g.hideHeaders) {
				g.headerCt.height = 0;
				g.headerCt.border = false;
				g.headerCt.addCls(Ext.baseCSSPrefix + "grid-header-ct-hidden");
				g.addCls(Ext.baseCSSPrefix + "grid-header-hidden");
				if (Ext.isIEQuirks) {
					g.headerCt.style = {
						display : "none"
					}
				}
			}
			if (a === true || a === "both") {
				d = c = true
			} else {
				if (a === "horizontal") {
					c = true
				} else {
					if (a === "vertical") {
						d = true
					} else {
						g.headerCt.availableSpaceOffset = 0
					}
				}
			}
			if (d) {
				g.verticalScroller = g.verticalScroller || {};
				Ext.applyIf(g.verticalScroller, {
							dock : g.verticalScrollDock,
							xtype : g.verticalScrollerType,
							store : g.store
						});
				g.verticalScroller = Ext.ComponentManager
						.create(g.verticalScroller);
				g.mon(g.verticalScroller, {
							bodyscroll : g.onVerticalScroll,
							scope : g
						})
			}
			if (c) {
				g.horizontalScroller = Ext.ComponentManager.create({
							xtype : "gridscroller",
							section : g,
							dock : "bottom",
							store : g.store
						});
				g.mon(g.horizontalScroller, {
							bodyscroll : g.onHorizontalScroll,
							scope : g
						})
			}
			g.headerCt.on("columnresize", g.onHeaderResize, g);
			g.relayEvents(g.headerCt, ["columnresize", "columnmove",
							"columnhide", "columnshow", "sortchange"]);
			g.features = g.features || [];
			g.dockedItems = g.dockedItems || [];
			g.dockedItems.unshift(g.headerCt);
			g.viewConfig = g.viewConfig || {};
			g.viewConfig.invalidateScrollerOnRefresh = g.invalidateScrollerOnRefresh;
			b = g.getView();
			if (b) {
				g.mon(b.store, {
							load : g.onStoreLoad,
							scope : g
						});
				g.mon(b, {
							refresh : {
								fn : this.onViewRefresh,
								scope : g,
								buffer : 50
							},
							itemupdate : g.onViewItemUpdate,
							scope : g
						});
				this.relayEvents(b, ["beforeitemmousedown",
								"beforeitemmouseup", "beforeitemmouseenter",
								"beforeitemmouseleave", "beforeitemclick",
								"beforeitemdblclick", "beforeitemcontextmenu",
								"itemmousedown", "itemmouseup",
								"itemmouseenter", "itemmouseleave",
								"itemclick", "itemdblclick", "itemcontextmenu",
								"beforecontainermousedown",
								"beforecontainermouseup",
								"beforecontainermouseover",
								"beforecontainermouseout",
								"beforecontainerclick",
								"beforecontainerdblclick",
								"beforecontainercontextmenu",
								"containermouseup", "containermouseover",
								"containermouseout", "containerclick",
								"containerdblclick", "containercontextmenu",
								"selectionchange", "beforeselect"])
			}
		}
		g.callParent(arguments)
	},
	initStateEvents : function() {
		var a = this.stateEvents;
		Ext.each(["columnresize", "columnmove", "columnhide", "columnshow",
						"sortchange"], function(b) {
					if (Ext.Array.indexOf(a, b)) {
						a.push(b)
					}
				});
		this.callParent()
	},
	getState : function() {
		var a = {
			columns : []
		}, b = this.store.sorters.first();
		this.headerCt.items.each(function(c) {
					a.columns.push({
								id : c.headerId,
								width : c.flex ? undefined : c.width,
								hidden : c.hidden,
								sortable : c.sortable
							})
				});
		if (b) {
			a.sort = {
				property : b.property,
				direction : b.direction
			}
		}
		return a
	},
	applyState : function(a) {
		var c = a.columns, b = c ? c.length : 0, d = this.headerCt, h = d.items, l = a.sort, j = this.store, e = 0, g, k, f;
		for (; e < b; ++e) {
			k = c[e];
			f = d.down("gridcolumn[headerId=" + k.id + "]");
			g = h.indexOf(f);
			if (e !== g) {
				d.moveHeader(g, e)
			}
			f.sortable = k.sortable;
			if (Ext.isDefined(k.width)) {
				delete f.flex;
				if (f.rendered) {
					f.setWidth(k.width)
				} else {
					f.minWidth = f.width = k.width
				}
			}
			f.hidden = k.hidden
		}
		if (l) {
			if (j.remoteSort) {
				j.sorters.add(Ext.create("Ext.util.Sorter", {
							property : l.property,
							direction : l.direction
						}))
			} else {
				j.sort(l.property, l.direction)
			}
		}
	},
	getStore : function() {
		return this.store
	},
	getView : function() {
		var a = this, b;
		if (!a.view) {
			b = a.getSelectionModel();
			a.view = a.createComponent(Ext.apply({}, a.viewConfig, {
						xtype : a.viewType,
						store : a.store,
						headerCt : a.headerCt,
						selModel : b,
						features : a.features,
						panel : a
					}));
			a.mon(a.view, {
						uievent : a.processEvent,
						scope : a
					});
			b.view = a.view;
			a.headerCt.view = a.view;
			a.relayEvents(a.view, ["cellclick", "celldblclick"])
		}
		return a.view
	},
	setAutoScroll : Ext.emptyFn,
	elScroll : function(d, e, b) {
		var c = this, a;
		if (d === "up" || d === "left") {
			e = -e
		}
		if (d === "down" || d === "up") {
			a = c.getVerticalScroller();
			a.scrollByDeltaY(e)
		} else {
			a = c.getHorizontalScroller();
			a.scrollByDeltaX(e)
		}
	},
	afterLayout : function() {
		this.callParent(arguments);
		this.injectView()
	},
	injectView : function() {
		if (!this.hasView && !this.collapsed) {
			var b = this, a = b.getView();
			b.hasView = true;
			b.add(a);
			a.el.scroll = Ext.Function.bind(b.elScroll, b);
			b.mon(a.el, {
						mousewheel : b.onMouseWheel,
						scope : b
					})
		}
	},
	afterExpand : function() {
		this.callParent(arguments);
		if (!this.hasView) {
			this.injectView()
		}
	},
	processEvent : function(f, b, a, c, d, h) {
		var g = this, i;
		if (d !== -1) {
			i = g.headerCt.getGridColumns()[d];
			return i.processEvent.apply(i, arguments)
		}
	},
	determineScrollbars : function() {
		var e = this, b, a, f, d, c;
		if (!e.collapsed && e.view && e.view.el) {
			b = e.view.el.dom;
			a = e.headerCt.getFullWidth();
			f = b.offsetWidth;
			if (e.verticalScroller && e.verticalScroller.el) {
				d = e.verticalScroller.getSizeCalculation().height
			} else {
				d = b.scrollHeight
			}
			c = b.clientHeight;
			if (!e.collapsed && d > c) {
				e.showVerticalScroller()
			} else {
				e.hideVerticalScroller()
			}
			if (!e.collapsed && a > (f + Ext.getScrollBarWidth() - 2)) {
				e.showHorizontalScroller()
			} else {
				e.hideHorizontalScroller()
			}
		}
	},
	onHeaderResize : function() {
		if (this.view && this.view.rendered) {
			this.determineScrollbars();
			this.invalidateScroller()
		}
	},
	hideHorizontalScroller : function() {
		var a = this;
		if (a.horizontalScroller && a.horizontalScroller.ownerCt === a) {
			a.verticalScroller.offsets.bottom = 0;
			a.removeDocked(a.horizontalScroller, false);
			a.removeCls(a.horizontalScrollerPresentCls);
			a.fireEvent("scrollerhide", a.horizontalScroller, "horizontal")
		}
	},
	showHorizontalScroller : function() {
		var a = this;
		if (a.verticalScroller) {
			a.verticalScroller.offsets.bottom = Ext.getScrollBarWidth() - 2
		}
		if (a.horizontalScroller && a.horizontalScroller.ownerCt !== a) {
			a.addDocked(a.horizontalScroller);
			a.addCls(a.horizontalScrollerPresentCls);
			a.fireEvent("scrollershow", a.horizontalScroller, "horizontal")
		}
	},
	hideVerticalScroller : function() {
		var a = this, b = a.headerCt;
		if (b && b.layout.reserveOffset) {
			b.layout.reserveOffset = false;
			b.doLayout()
		}
		if (a.verticalScroller && a.verticalScroller.ownerCt === a) {
			a.removeDocked(a.verticalScroller, false);
			a.removeCls(a.verticalScrollerPresentCls);
			a.fireEvent("scrollerhide", a.verticalScroller, "vertical")
		}
	},
	showVerticalScroller : function() {
		var a = this, b = a.headerCt;
		if (b && !b.layout.reserveOffset) {
			b.layout.reserveOffset = true;
			b.doLayout()
		}
		if (a.verticalScroller && a.verticalScroller.ownerCt !== a) {
			a.addDocked(a.verticalScroller);
			a.addCls(a.verticalScrollerPresentCls);
			a.fireEvent("scrollershow", a.verticalScroller, "vertical")
		}
	},
	invalidateScroller : function() {
		var b = this, a = b.verticalScroller, c = b.horizontalScroller;
		if (a) {
			a.invalidate()
		}
		if (c) {
			c.invalidate()
		}
	},
	onHeaderMove : function(c, d, a, b) {
		this.view.refresh()
	},
	onHeaderHide : function(a, b) {
		this.invalidateScroller()
	},
	onHeaderShow : function(a, b) {
		this.invalidateScroller()
	},
	getVerticalScroller : function() {
		return this.getScrollerOwner().down("gridscroller[dock="
				+ this.verticalScrollDock + "]")
	},
	getHorizontalScroller : function() {
		return this.getScrollerOwner().down("gridscroller[dock=bottom]")
	},
	onMouseWheel : function(j) {
		var k = this, n = j.browserEvent, g = k.getVerticalScroller(), l = k
				.getHorizontalScroller(), c = k.scrollDelta, d, f, i, m, h, b, o, a;
		if (l) {
			m = l.el;
			if (m) {
				h = m.dom.scrollLeft
			}
		}
		if (g) {
			i = g.el;
			if (i) {
				b = i.dom.scrollTop
			}
		}
		if (n.wheelDeltaX || n.wheelDeltaY) {
			f = -n.wheelDeltaX / 120 * c / 3;
			d = -n.wheelDeltaY / 120 * c / 3;
			if (l) {
				o = l.scrollByDeltaX(f)
			}
			if (g) {
				a = g.scrollByDeltaY(d)
			}
		} else {
			if (n.axis && n.axis === 1) {
				if (l) {
					f = -(c * j.getWheelDelta()) / 3;
					o = l.scrollByDeltaX(f)
				}
			} else {
				if (g) {
					d = -(c * j.getWheelDelta() / 3);
					a = g.scrollByDeltaY(d)
				}
			}
		}
		if ((f !== 0 && o !== h) || (d !== 0 && a !== b)) {
			j.stopEvent()
		}
	},
	onViewRefresh : function() {
		if (Ext.isIE) {
			this.syncCellHeight()
		}
		this.determineScrollbars();
		if (this.invalidateScrollerOnRefresh) {
			this.invalidateScroller()
		}
	},
	onViewItemUpdate : function(a, b, c) {
		if (Ext.isIE) {
			this.syncCellHeight([c])
		}
	},
	syncCellHeight : function(g) {
		var m = this, f = 0, e, d, h, l, c, n, k = [], a, b = ("."
				+ Ext.baseCSSPrefix + "grid-cell");
		g = g || m.view.getNodes();
		n = g.length;
		for (; f < n; f++) {
			l = g[f];
			e = Ext.fly(l).query(b);
			h = e.length;
			a = [];
			for (d = 0; d < h; d++) {
				c = e[d];
				a.push(c.clientHeight)
			}
			k.push(Ext.Array.max(a))
		}
		for (f = 0; f < n; f++) {
			l = g[f];
			h = l.childNodes.length;
			for (d = 0; d < h; d++) {
				c = Ext.fly(l.childNodes[d]);
				if (k[f]) {
					if (c.is(b)) {
						c.setHeight(k[f])
					} else {
						c.down(b).setHeight(k[f])
					}
				}
			}
		}
	},
	setScrollTop : function(d) {
		var c = this, b = c.getScrollerOwner(), a = c.getVerticalScroller();
		b.virtualScrollTop = d;
		if (a) {
			a.setScrollTop(d)
		}
	},
	getScrollerOwner : function() {
		var a = this;
		if (!this.scrollerOwner) {
			a = this.up("[scrollerOwner]")
		}
		return a
	},
	scrollByDeltaY : function(a) {
		var c = this.getScrollerOwner(), b;
		b = c.down("gridscroller[dock=" + this.verticalScrollDock + "]");
		if (b) {
			b.scrollByDeltaY(a)
		}
	},
	scrollByDeltaX : function(a) {
		this.horizontalScroller.scrollByDeltaX(a)
	},
	getLhsMarker : function() {
		var a = this;
		if (!a.lhsMarker) {
			a.lhsMarker = Ext.core.DomHelper.append(a.el, {
						cls : Ext.baseCSSPrefix + "grid-resize-marker"
					}, true)
		}
		return a.lhsMarker
	},
	getRhsMarker : function() {
		var a = this;
		if (!a.rhsMarker) {
			a.rhsMarker = Ext.core.DomHelper.append(a.el, {
						cls : Ext.baseCSSPrefix + "grid-resize-marker"
					}, true)
		}
		return a.rhsMarker
	},
	getSelectionModel : function() {
		if (!this.selModel) {
			this.selModel = {}
		}
		var b = "SINGLE", a;
		if (this.simpleSelect) {
			b = "SIMPLE"
		} else {
			if (this.multiSelect) {
				b = "MULTI"
			}
		}
		Ext.applyIf(this.selModel, {
					allowDeselect : this.allowDeselect,
					mode : b
				});
		if (!this.selModel.events) {
			a = this.selModel.selType || this.selType;
			this.selModel = Ext.create("selection." + a, this.selModel)
		}
		if (!this.selModel.hasRelaySetup) {
			this.relayEvents(this.selModel, ["selectionchange", "select",
							"deselect"]);
			this.selModel.hasRelaySetup = true
		}
		if (this.disableSelection) {
			this.selModel.locked = true
		}
		return this.selModel
	},
	onVerticalScroll : function(e, f) {
		var b = this.getScrollerOwner(), c = b.query("tableview"), d = 0, a = c.length;
		for (; d < a; d++) {
			c[d].el.dom.scrollTop = f.scrollTop
		}
	},
	onHorizontalScroll : function(b, j) {
		var d = this.getScrollerOwner(), k = d.query("tableview"), f = 0, h = k.length, a, e, g, l, c;
		a = k[1] || k[0];
		e = a.el.dom;
		g = e.scrollWidth;
		l = e.offsetWidth;
		c = this.horizontalScroller.getWidth();
		e.scrollLeft = j.scrollLeft;
		this.headerCt.el.dom.scrollLeft = j.scrollLeft
	},
	onStoreLoad : Ext.emptyFn,
	getEditorParent : function() {
		return this.body
	},
	bindStore : function(a) {
		var b = this;
		b.store = a;
		b.getView().bindStore(a)
	},
	reconfigure : function(a, b) {
		var c = this;
		if (c.lockable) {
			c.reconfigureLockable(a, b);
			return
		}
		if (b) {
			c.headerCt.removeAll();
			c.headerCt.add(b)
		}
		if (a) {
			a = Ext.StoreManager.lookup(a);
			c.bindStore(a)
		} else {
			c.getView().refresh()
		}
	},
	afterComponentLayout : function() {
		this.callParent(arguments);
		this.determineScrollbars();
		this.invalidateScroller()
	}
});
Ext.define("Ext.grid.Panel", {
			extend : "Ext.panel.Table",
			requires : ["Ext.grid.View"],
			alias : ["widget.gridpanel", "widget.grid"],
			alternateClassName : ["Ext.list.ListView", "Ext.ListView",
					"Ext.grid.GridPanel"],
			viewType : "gridview",
			lockable : false,
			normalCfgCopy : ["invalidateScrollerOnRefresh", "verticalScroller",
					"verticalScrollDock", "verticalScrollerType", "scroll"],
			lockedCfgCopy : ["invalidateScrollerOnRefresh"],
			initComponent : function() {
				var a = this;
				if (a.columnLines) {
					a.setColumnLines(a.columnLines)
				}
				a.callParent()
			},
			setColumnLines : function(a) {
				var b = this, c = (a) ? "addClsWithUI" : "removeClsWithUI";
				b[c]("with-col-lines")
			}
		});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.GridWindow", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.data.ArrayStore", "Ext.util.Format", "Ext.grid.Panel",
			"Ext.grid.RowNumberer"],
	id : "grid-win",
	init : function() {
		this.launcher = {
			text : "Grid Window",
			iconCls : "icon-grid",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("grid-win");
		if (!a) {
			a = b.createWindow({
						id : "grid-win",
						title : "Grid Window",
						width : 740,
						height : 480,
						iconCls : "icon-grid",
						animCollapse : false,
						constrainHeader : true,
						layout : "fit",
						items : [{
							border : false,
							xtype : "grid",
							store : new Ext.data.ArrayStore({
										fields : [{
													name : "company"
												}, {
													name : "price",
													type : "float"
												}, {
													name : "change",
													type : "float"
												}, {
													name : "pctChange",
													type : "float"
												}],
										data : MyDesktop.GridWindow
												.getDummyData()
									}),
							columns : [new Ext.grid.RowNumberer(), {
										text : "Company",
										flex : 1,
										sortable : true,
										dataIndex : "company"
									}, {
										text : "Price",
										width : 70,
										sortable : true,
										renderer : Ext.util.Format.usMoney,
										dataIndex : "price"
									}, {
										text : "Change",
										width : 70,
										sortable : true,
										dataIndex : "change"
									}, {
										text : "% Change",
										width : 70,
										sortable : true,
										dataIndex : "pctChange"
									}]
						}],
						tbar : [{
									text : "Add Something",
									tooltip : "Add a new row",
									iconCls : "add"
								}, "-", {
									text : "Options",
									tooltip : "Blah blah blah blaht",
									iconCls : "option"
								}, "-", {
									text : "Remove Something",
									tooltip : "Remove the selected item",
									iconCls : "remove"
								}]
					})
		}
		a.show();
		return a
	},
	statics : {
		getDummyData : function() {
			return [
					["3m Co", 71.72, 0.02, 0.03, "9/1 12:00am"],
					["Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am"],
					["American Express Company", 52.55, 0.01, 0.02,
							"9/1 12:00am"],
					["American International Group, Inc.", 64.13, 0.31, 0.49,
							"9/1 12:00am"],
					["AT&T Inc.", 31.61, -0.48, -1.54, "9/1 12:00am"],
					["Caterpillar Inc.", 67.27, 0.92, 1.39, "9/1 12:00am"],
					["Citigroup, Inc.", 49.37, 0.02, 0.04, "9/1 12:00am"],
					["Exxon Mobil Corp", 68.1, -0.43, -0.64, "9/1 12:00am"],
					["General Electric Company", 34.14, -0.08, -0.23,
							"9/1 12:00am"],
					["General Motors Corporation", 30.27, 1.09, 3.74,
							"9/1 12:00am"],
					["Hewlett-Packard Co.", 36.53, -0.03, -0.08, "9/1 12:00am"],
					["Honeywell Intl Inc", 38.77, 0.05, 0.13, "9/1 12:00am"],
					["Intel Corporation", 19.88, 0.31, 1.58, "9/1 12:00am"],
					["Johnson & Johnson", 64.72, 0.06, 0.09, "9/1 12:00am"],
					["Merck & Co., Inc.", 40.96, 0.41, 1.01, "9/1 12:00am"],
					["Microsoft Corporation", 25.84, 0.14, 0.54, "9/1 12:00am"],
					["The Coca-Cola Company", 45.07, 0.26, 0.58, "9/1 12:00am"],
					["The Procter & Gamble Company", 61.91, 0.01, 0.02,
							"9/1 12:00am"],
					["Wal-Mart Stores, Inc.", 45.45, 0.73, 1.63, "9/1 12:00am"],
					["Walt Disney Company (The) (Holding Company)", 29.89,
							0.24, 0.81, "9/1 12:00am"]]
		}
	}
});
Ext.define("Ext.tree.Panel", {
			extend : "Ext.panel.Table",
			alias : "widget.treepanel",
			alternateClassName : ["Ext.tree.TreePanel", "Ext.TreePanel"],
			requires : ["Ext.tree.View", "Ext.selection.TreeModel",
					"Ext.tree.Column"],
			viewType : "treeview",
			selType : "treemodel",
			treeCls : Ext.baseCSSPrefix + "tree-panel",
			lines : true,
			useArrows : false,
			singleExpand : false,
			ddConfig : {
				enableDrag : true,
				enableDrop : true
			},
			rootVisible : true,
			displayField : "text",
			root : null,
			normalCfgCopy : ["displayField", "root", "singleExpand",
					"useArrows", "lines", "rootVisible", "scroll"],
			lockedCfgCopy : ["displayField", "root", "singleExpand",
					"useArrows", "lines", "rootVisible"],
			constructor : function(a) {
				a = a || {};
				if (a.animate === undefined) {
					a.animate = Ext.enableFx
				}
				this.enableAnimations = a.animate;
				delete a.animate;
				this.callParent([a])
			},
			initComponent : function() {
				var b = this, a = [b.treeCls];
				if (b.useArrows) {
					a.push(Ext.baseCSSPrefix + "tree-arrows");
					b.lines = false
				}
				if (b.lines) {
					a.push(Ext.baseCSSPrefix + "tree-lines")
				} else {
					if (!b.useArrows) {
						a.push(Ext.baseCSSPrefix + "tree-no-lines")
					}
				}
				if (!b.store || Ext.isObject(b.store) && !b.store.isStore) {
					b.store = Ext.create("Ext.data.TreeStore", Ext.apply({},
									b.store || {}, {
										root : b.root,
										fields : b.fields,
										model : b.model,
										folderSort : b.folderSort
									}))
				} else {
					if (b.root) {
						b.store = Ext.data.StoreManager.lookup(b.store);
						b.store.setRootNode(b.root);
						if (b.folderSort !== undefined) {
							b.store.folderSort = b.folderSort;
							b.store.sort()
						}
					}
				}
				b.viewConfig = Ext.applyIf(b.viewConfig || {}, {
							rootVisible : b.rootVisible,
							animate : b.enableAnimations,
							singleExpand : b.singleExpand,
							node : b.store.getRootNode(),
							hideHeaders : b.hideHeaders
						});
				b.mon(b.store, {
							scope : b,
							rootchange : b.onRootChange,
							clear : b.onClear
						});
				b.relayEvents(b.store, ["beforeload", "load"]);
				b.store.on({
							append : b.createRelayer("itemappend"),
							remove : b.createRelayer("itemremove"),
							move : b.createRelayer("itemmove"),
							insert : b.createRelayer("iteminsert"),
							beforeappend : b.createRelayer("beforeitemappend"),
							beforeremove : b.createRelayer("beforeitemremove"),
							beforemove : b.createRelayer("beforeitemmove"),
							beforeinsert : b.createRelayer("beforeiteminsert"),
							expand : b.createRelayer("itemexpand"),
							collapse : b.createRelayer("itemcollapse"),
							beforeexpand : b.createRelayer("beforeitemexpand"),
							beforecollapse : b
									.createRelayer("beforeitemcollapse")
						});
				if (!b.columns) {
					if (b.initialConfig.hideHeaders === undefined) {
						b.hideHeaders = true
					}
					b.columns = [{
								xtype : "treecolumn",
								text : "Name",
								flex : 1,
								dataIndex : b.displayField
							}]
				}
				if (b.cls) {
					a.push(b.cls)
				}
				b.cls = a.join(" ");
				b.callParent();
				b.relayEvents(b.getView(), ["checkchange"]);
				if (!b.getView().rootVisible && !b.getRootNode()) {
					b.setRootNode({
								expanded : true
							})
				}
			},
			onClear : function() {
				this.view.onClear()
			},
			setRootNode : function() {
				return this.store.setRootNode.apply(this.store, arguments)
			},
			getRootNode : function() {
				return this.store.getRootNode()
			},
			onRootChange : function(a) {
				this.view.setRootNode(a)
			},
			getChecked : function() {
				return this.getView().getChecked()
			},
			isItemChecked : function(a) {
				return a.get("checked")
			},
			expandAll : function(c, b) {
				var a = this.getRootNode();
				if (a) {
					a.expand(true, c, b)
				}
			},
			collapseAll : function(c, b) {
				var a = this.getRootNode();
				if (a) {
					if (this.getView().rootVisible) {
						a.collapse(true, c, b)
					} else {
						a.collapseChildren(true, c, b)
					}
				}
			},
			expandPath : function(k, f, a, g, j) {
				var d = this, c = d.getRootNode(), b = 1, e = d.getView(), i, h;
				f = f || d.getRootNode().idProperty;
				a = a || "/";
				if (Ext.isEmpty(k)) {
					Ext.callback(g, j || d, [false, null]);
					return
				}
				i = k.split(a);
				if (c.get(f) != i[1]) {
					Ext.callback(g, j || d, [false, c]);
					return
				}
				h = function() {
					if (++b === i.length) {
						Ext.callback(g, j || d, [true, c]);
						return
					}
					var l = c.findChild(f, i[b]);
					if (!l) {
						Ext.callback(g, j || d, [false, c]);
						return
					}
					c = l;
					c.expand(false, h)
				};
				c.expand(false, h)
			},
			selectPath : function(g, f, e, h, a) {
				var d = this, c, b;
				f = f || d.getRootNode().idProperty;
				e = e || "/";
				c = g.split(e);
				b = c.pop();
				d.expandPath(c.join("/"), f, e, function(k, j) {
							var i = false;
							if (k && j) {
								j = j.findChild(f, b);
								if (j) {
									d.getSelectionModel().select(j);
									Ext.callback(h, a || d, [true, j]);
									i = true
								}
							} else {
								if (j === d.getRootNode()) {
									i = true
								}
							}
							Ext.callback(h, a || d, [i, j])
						}, d)
			}
		});
/*
 * Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.AccordionWindow", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.data.TreeStore", "Ext.layout.container.Accordion",
			"Ext.toolbar.Spacer", "Ext.tree.Panel"],
	id : "acc-win",
	init : function() {
		this.launcher = {
			text : "Accordion Window",
			iconCls : "accordion",
			handler : this.createWindow,
			scope : this
		}
	},
	createTree : function() {
		var a = Ext.create("Ext.tree.Panel", {
					id : "im-tree",
					title : "Online Users",
					rootVisible : false,
					lines : false,
					autoScroll : true,
					tools : [{
								type : "refresh",
								handler : function(e, d) {
									a.setLoading(true, a.body);
									var b = a.getRootNode();
									b.collapseChildren(true, false);
									Ext.Function.defer(function() {
												a.setLoading(false);
												b.expand(true, true)
											}, 1000)
								}
							}],
					store : Ext.create("Ext.data.TreeStore", {
								root : {
									text : "Online",
									expanded : true,
									children : [{
												text : "Friends",
												expanded : true,
												children : [{
															text : "Brian",
															iconCls : "user",
															leaf : true
														}, {
															text : "Kevin",
															iconCls : "user",
															leaf : true
														}, {
															text : "Mark",
															iconCls : "user",
															leaf : true
														}, {
															text : "Matt",
															iconCls : "user",
															leaf : true
														}, {
															text : "Michael",
															iconCls : "user",
															leaf : true
														}, {
															text : "Mike Jr",
															iconCls : "user",
															leaf : true
														}, {
															text : "Mike Sr",
															iconCls : "user",
															leaf : true
														}, {
															text : "JR",
															iconCls : "user",
															leaf : true
														}, {
															text : "Rich",
															iconCls : "user",
															leaf : true
														}, {
															text : "Nige",
															iconCls : "user",
															leaf : true
														}, {
															text : "Zac",
															iconCls : "user",
															leaf : true
														}]
											}, {
												text : "Family",
												expanded : true,
												children : [{
															text : "Kiana",
															iconCls : "user-girl",
															leaf : true
														}, {
															text : "Aubrey",
															iconCls : "user-girl",
															leaf : true
														}, {
															text : "Cale",
															iconCls : "user-kid",
															leaf : true
														}]
											}]
								}
							})
				});
		return a
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("acc-win");
		if (!a) {
			a = b.createWindow({
				id : "acc-win",
				title : "Accordion Window",
				width : 250,
				height : 400,
				iconCls : "accordion",
				animCollapse : false,
				constrainHeader : true,
				bodyBorder : true,
				tbar : {
					xtype : "toolbar",
					ui : "plain",
					items : [{
								tooltip : {
									title : "Rich Tooltips",
									text : "Let your users know what they can do!"
								},
								iconCls : "connect"
							}, "-", {
								tooltip : "Add a new user",
								iconCls : "user-add"
							}, " ", {
								tooltip : "Remove the selected user",
								iconCls : "user-delete"
							}]
				},
				layout : "accordion",
				border : false,
				items : [this.createTree(), {
							title : "Settings",
							html : "<p>Something useful would be in here.</p>",
							autoScroll : true
						}, {
							title : "Even More Stuff",
							html : "<p>Something useful would be in here.</p>"
						}, {
							title : "My Stuff",
							html : "<p>Something useful would be in here.</p>"
						}]
			})
		}
		a.show();
		return a
	}
});
Ext.define("Ext.tip.Tip", {
			extend : "Ext.panel.Panel",
			requires : ["Ext.layout.component.Tip"],
			alternateClassName : "Ext.Tip",
			minWidth : 40,
			maxWidth : 300,
			shadow : "sides",
			defaultAlign : "tl-bl?",
			constrainPosition : true,
			frame : false,
			autoRender : true,
			hidden : true,
			baseCls : Ext.baseCSSPrefix + "tip",
			floating : {
				shadow : true,
				shim : true,
				constrain : true
			},
			focusOnToFront : false,
			componentLayout : "tip",
			closeAction : "hide",
			ariaRole : "tooltip",
			initComponent : function() {
				this.callParent(arguments);
				this.constrain = this.constrain || this.constrainPosition
			},
			showAt : function(b) {
				var a = this;
				this.callParent();
				if (a.isVisible()) {
					a.setPagePosition(b[0], b[1]);
					if (a.constrainPosition || a.constrain) {
						a.doConstrain()
					}
					a.toFront(true)
				}
			},
			showBy : function(a, b) {
				this.showAt(this.el.getAlignToXY(a, b || this.defaultAlign))
			},
			initDraggable : function() {
				var a = this;
				a.draggable = {
					el : a.getDragEl(),
					delegate : a.header.el,
					constrain : a,
					constrainTo : a.el.dom.parentNode
				};
				Ext.Component.prototype.initDraggable.call(a)
			},
			ghost : undefined,
			unghost : undefined
		});
Ext.define("Ext.tip.ToolTip", {
	extend : "Ext.tip.Tip",
	alias : "widget.tooltip",
	alternateClassName : "Ext.ToolTip",
	showDelay : 500,
	hideDelay : 200,
	dismissDelay : 5000,
	trackMouse : false,
	anchorToTarget : true,
	anchorOffset : 0,
	targetCounter : 0,
	quickShowInterval : 250,
	initComponent : function() {
		var a = this;
		a.callParent(arguments);
		a.lastActive = new Date();
		a.setTarget(a.target);
		a.origAnchor = a.anchor
	},
	onRender : function(b, a) {
		var c = this;
		c.callParent(arguments);
		c.anchorCls = Ext.baseCSSPrefix + "tip-anchor-" + c.getAnchorPosition();
		c.anchorEl = c.el.createChild({
					cls : Ext.baseCSSPrefix + "tip-anchor " + c.anchorCls
				})
	},
	afterRender : function() {
		var a = this, b;
		a.callParent(arguments);
		b = parseInt(a.el.getZIndex(), 10) || 0;
		a.anchorEl.setStyle("z-index", b + 1)
				.setVisibilityMode(Ext.core.Element.DISPLAY)
	},
	setTarget : function(d) {
		var b = this, a = Ext.get(d), c;
		if (b.target) {
			c = Ext.get(b.target);
			b.mun(c, "mouseover", b.onTargetOver, b);
			b.mun(c, "mouseout", b.onTargetOut, b);
			b.mun(c, "mousemove", b.onMouseMove, b)
		}
		b.target = a;
		if (a) {
			b.mon(a, {
						freezeEvent : true,
						mouseover : b.onTargetOver,
						mouseout : b.onTargetOut,
						mousemove : b.onMouseMove,
						scope : b
					})
		}
		if (b.anchor) {
			b.anchorTarget = b.target
		}
	},
	onMouseMove : function(d) {
		var b = this, a = b.delegate
				? d.getTarget(b.delegate)
				: b.triggerElement = true, c;
		if (a) {
			b.targetXY = d.getXY();
			if (a === b.triggerElement) {
				if (!b.hidden && b.trackMouse) {
					c = b.getTargetXY();
					if (b.constrainPosition) {
						c = b.el.adjustForConstraints(c, b.el.dom.parentNode)
					}
					b.setPagePosition(c)
				}
			} else {
				b.hide();
				b.lastActive = new Date(0);
				b.onTargetOver(d)
			}
		} else {
			if ((!b.closable && b.isVisible()) && b.autoHide !== false) {
				b.hide()
			}
		}
	},
	getTargetXY : function() {
		var i = this, d;
		if (i.delegate) {
			i.anchorTarget = i.triggerElement
		}
		if (i.anchor) {
			i.targetCounter++;
			var c = i.getOffsets(), m = (i.anchorToTarget && !i.trackMouse)
					? i.el.getAlignToXY(i.anchorTarget, i.getAnchorAlign())
					: i.targetXY, a = Ext.core.Element.getViewWidth() - 5, h = Ext.core.Element
					.getViewHeight()
					- 5, k = document.documentElement, e = document.body, l = (k.scrollLeft
					|| e.scrollLeft || 0)
					+ 5, j = (k.scrollTop || e.scrollTop || 0) + 5, b = [
					m[0] + c[0], m[1] + c[1]], g = i.getSize(), f = i.constrainPosition;
			i.anchorEl.removeCls(i.anchorCls);
			if (i.targetCounter < 2 && f) {
				if (b[0] < l) {
					if (i.anchorToTarget) {
						i.defaultAlign = "l-r";
						if (i.mouseOffset) {
							i.mouseOffset[0] *= -1
						}
					}
					i.anchor = "left";
					return i.getTargetXY()
				}
				if (b[0] + g.width > a) {
					if (i.anchorToTarget) {
						i.defaultAlign = "r-l";
						if (i.mouseOffset) {
							i.mouseOffset[0] *= -1
						}
					}
					i.anchor = "right";
					return i.getTargetXY()
				}
				if (b[1] < j) {
					if (i.anchorToTarget) {
						i.defaultAlign = "t-b";
						if (i.mouseOffset) {
							i.mouseOffset[1] *= -1
						}
					}
					i.anchor = "top";
					return i.getTargetXY()
				}
				if (b[1] + g.height > h) {
					if (i.anchorToTarget) {
						i.defaultAlign = "b-t";
						if (i.mouseOffset) {
							i.mouseOffset[1] *= -1
						}
					}
					i.anchor = "bottom";
					return i.getTargetXY()
				}
			}
			i.anchorCls = Ext.baseCSSPrefix + "tip-anchor-"
					+ i.getAnchorPosition();
			i.anchorEl.addCls(i.anchorCls);
			i.targetCounter = 0;
			return b
		} else {
			d = i.getMouseOffset();
			return (i.targetXY)
					? [i.targetXY[0] + d[0], i.targetXY[1] + d[1]]
					: d
		}
	},
	getMouseOffset : function() {
		var a = this, b = a.anchor ? [0, 0] : [15, 18];
		if (a.mouseOffset) {
			b[0] += a.mouseOffset[0];
			b[1] += a.mouseOffset[1]
		}
		return b
	},
	getAnchorPosition : function() {
		var b = this, a;
		if (b.anchor) {
			b.tipAnchor = b.anchor.charAt(0)
		} else {
			a = b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);
			b.tipAnchor = a[1].charAt(0)
		}
		switch (b.tipAnchor) {
			case "t" :
				return "top";
			case "b" :
				return "bottom";
			case "r" :
				return "right"
		}
		return "left"
	},
	getAnchorAlign : function() {
		switch (this.anchor) {
			case "top" :
				return "tl-bl";
			case "left" :
				return "tl-tr";
			case "right" :
				return "tr-tl";
			default :
				return "bl-tl"
		}
	},
	getOffsets : function() {
		var c = this, d, b, a = c.getAnchorPosition().charAt(0);
		if (c.anchorToTarget && !c.trackMouse) {
			switch (a) {
				case "t" :
					b = [0, 9];
					break;
				case "b" :
					b = [0, -13];
					break;
				case "r" :
					b = [-13, 0];
					break;
				default :
					b = [9, 0];
					break
			}
		} else {
			switch (a) {
				case "t" :
					b = [-15 - c.anchorOffset, 30];
					break;
				case "b" :
					b = [-19 - c.anchorOffset, -13 - c.el.dom.offsetHeight];
					break;
				case "r" :
					b = [-15 - c.el.dom.offsetWidth, -13 - c.anchorOffset];
					break;
				default :
					b = [25, -13 - c.anchorOffset];
					break
			}
		}
		d = c.getMouseOffset();
		b[0] += d[0];
		b[1] += d[1];
		return b
	},
	onTargetOver : function(c) {
		var b = this, a;
		if (b.disabled || c.within(b.target.dom, true)) {
			return
		}
		a = c.getTarget(b.delegate);
		if (a) {
			b.triggerElement = a;
			b.clearTimer("hide");
			b.targetXY = c.getXY();
			b.delayShow()
		}
	},
	delayShow : function() {
		var a = this;
		if (a.hidden && !a.showTimer) {
			if (Ext.Date.getElapsed(a.lastActive) < a.quickShowInterval) {
				a.show()
			} else {
				a.showTimer = Ext.defer(a.show, a.showDelay, a)
			}
		} else {
			if (!a.hidden && a.autoHide !== false) {
				a.show()
			}
		}
	},
	onTargetOut : function(b) {
		var a = this;
		if (a.disabled || b.within(a.target.dom, true)) {
			return
		}
		a.clearTimer("show");
		if (a.autoHide !== false) {
			a.delayHide()
		}
	},
	delayHide : function() {
		var a = this;
		if (!a.hidden && !a.hideTimer) {
			a.hideTimer = Ext.defer(a.hide, a.hideDelay, a)
		}
	},
	hide : function() {
		var a = this;
		a.clearTimer("dismiss");
		a.lastActive = new Date();
		if (a.anchorEl) {
			a.anchorEl.hide()
		}
		a.callParent(arguments);
		delete a.triggerElement
	},
	show : function() {
		var a = this;
		this.callParent();
		if (this.hidden === false) {
			a.setPagePosition(-10000, -10000);
			if (a.anchor) {
				a.anchor = a.origAnchor
			}
			a.showAt(a.getTargetXY());
			if (a.anchor) {
				a.syncAnchor();
				a.anchorEl.show()
			} else {
				a.anchorEl.hide()
			}
		}
	},
	showAt : function(b) {
		var a = this;
		a.lastActive = new Date();
		a.clearTimers();
		if (!a.isVisible()) {
			this.callParent(arguments)
		}
		if (a.isVisible()) {
			a.setPagePosition(b[0], b[1]);
			if (a.constrainPosition || a.constrain) {
				a.doConstrain()
			}
			a.toFront(true)
		}
		if (a.dismissDelay && a.autoHide !== false) {
			a.dismissTimer = Ext.defer(a.hide, a.dismissDelay, a)
		}
		if (a.anchor) {
			a.syncAnchor();
			if (!a.anchorEl.isVisible()) {
				a.anchorEl.show()
			}
		} else {
			a.anchorEl.hide()
		}
	},
	syncAnchor : function() {
		var c = this, a, b, d;
		switch (c.tipAnchor.charAt(0)) {
			case "t" :
				a = "b";
				b = "tl";
				d = [20 + c.anchorOffset, 1];
				break;
			case "r" :
				a = "l";
				b = "tr";
				d = [-1, 12 + c.anchorOffset];
				break;
			case "b" :
				a = "t";
				b = "bl";
				d = [20 + c.anchorOffset, -1];
				break;
			default :
				a = "r";
				b = "tl";
				d = [1, 12 + c.anchorOffset];
				break
		}
		c.anchorEl.alignTo(c.el, a + "-" + b, d)
	},
	setPagePosition : function(a, c) {
		var b = this;
		b.callParent(arguments);
		if (b.anchor) {
			b.syncAnchor()
		}
	},
	clearTimer : function(a) {
		a = a + "Timer";
		clearTimeout(this[a]);
		delete this[a]
	},
	clearTimers : function() {
		var a = this;
		a.clearTimer("show");
		a.clearTimer("dismiss");
		a.clearTimer("hide")
	},
	onShow : function() {
		var a = this;
		a.callParent();
		a.mon(Ext.getDoc(), "mousedown", a.onDocMouseDown, a)
	},
	onHide : function() {
		var a = this;
		a.callParent();
		a.mun(Ext.getDoc(), "mousedown", a.onDocMouseDown, a)
	},
	onDocMouseDown : function(b) {
		var a = this;
		if (a.autoHide !== true && !a.closable && !b.within(a.el.dom)) {
			a.disable();
			Ext.defer(a.doEnable, 100, a)
		}
	},
	doEnable : function() {
		if (!this.isDestroyed) {
			this.enable()
		}
	},
	onDisable : function() {
		this.callParent();
		this.clearTimers();
		this.hide()
	},
	beforeDestroy : function() {
		var a = this;
		a.clearTimers();
		Ext.destroy(a.anchorEl);
		delete a.anchorEl;
		delete a.target;
		delete a.anchorTarget;
		delete a.triggerElement;
		a.callParent()
	},
	onDestroy : function() {
		Ext.getDoc().un("mousedown", this.onDocMouseDown, this);
		this.callParent()
	}
});
Ext.define("Ext.chart.Tip", {
	requires : ["Ext.tip.ToolTip", "Ext.chart.TipSurface"],
	constructor : function(b) {
		var c = this, a, d, e;
		if (b.tips) {
			c.tipTimeout = null;
			c.tipConfig = Ext.apply({}, b.tips, {
						renderer : Ext.emptyFn,
						constrainPosition : false
					});
			c.tooltip = Ext.create("Ext.tip.ToolTip", c.tipConfig);
			Ext.getBody().on("mousemove", c.tooltip.onMouseMove, c.tooltip);
			if (c.tipConfig.surface) {
				a = c.tipConfig.surface;
				d = a.sprites;
				e = Ext.create("Ext.chart.TipSurface", {
							id : "tipSurfaceComponent",
							sprites : d
						});
				if (a.width && a.height) {
					e.setSize(a.width, a.height)
				}
				c.tooltip.add(e);
				c.spriteTip = e
			}
		}
	},
	showTip : function(k) {
		var e = this;
		if (!e.tooltip) {
			return
		}
		clearTimeout(e.tipTimeout);
		var l = e.tooltip, a = e.spriteTip, c = e.tipConfig, d = l.trackMouse, j, b, i, g, h, f;
		if (!d) {
			l.trackMouse = true;
			j = k.sprite;
			b = j.surface;
			i = Ext.get(b.getId());
			if (i) {
				g = i.getXY();
				h = g[0] + (j.attr.x || 0)
						+ (j.attr.translation && j.attr.translation.x || 0);
				f = g[1] + (j.attr.y || 0)
						+ (j.attr.translation && j.attr.translation.y || 0);
				l.targetXY = [h, f]
			}
		}
		if (a) {
			c.renderer.call(l, k.storeItem, k, a.surface)
		} else {
			c.renderer.call(l, k.storeItem, k)
		}
		l.show();
		l.trackMouse = d
	},
	hideTip : function(a) {
		var b = this.tooltip;
		if (!b) {
			return
		}
		clearTimeout(this.tipTimeout);
		this.tipTimeout = setTimeout(function() {
					b.hide()
				}, 0)
	}
});
Ext.define("Ext.chart.series.Series", {
	mixins : {
		observable : "Ext.util.Observable",
		labels : "Ext.chart.Label",
		highlights : "Ext.chart.Highlight",
		tips : "Ext.chart.Tip",
		callouts : "Ext.chart.Callout"
	},
	type : null,
	title : null,
	showInLegend : true,
	renderer : function(e, a, c, d, b) {
		return c
	},
	shadowAttributes : null,
	triggerAfterDraw : false,
	constructor : function(a) {
		var b = this;
		if (a) {
			Ext.apply(b, a)
		}
		b.shadowGroups = [];
		b.mixins.labels.constructor.call(b, a);
		b.mixins.highlights.constructor.call(b, a);
		b.mixins.tips.constructor.call(b, a);
		b.mixins.callouts.constructor.call(b, a);
		b.addEvents({
					scope : b,
					itemmouseover : true,
					itemmouseout : true,
					itemmousedown : true,
					itemmouseup : true,
					mouseleave : true,
					afterdraw : true,
					titlechange : true
				});
		b.mixins.observable.constructor.call(b, a);
		b.on({
					scope : b,
					itemmouseover : b.onItemMouseOver,
					itemmouseout : b.onItemMouseOut,
					mouseleave : b.onMouseLeave
				})
	},
	setBBox : function(a) {
		var e = this, c = e.chart, b = c.chartBBox, f = a ? 0 : c.maxGutter[0], d = a
				? 0
				: c.maxGutter[1], g, h;
		g = {
			x : b.x,
			y : b.y,
			width : b.width,
			height : b.height
		};
		e.clipBox = g;
		h = {
			x : (g.x + f) - (c.zoom.x * c.zoom.width),
			y : (g.y + d) - (c.zoom.y * c.zoom.height),
			width : (g.width - (f * 2)) * c.zoom.width,
			height : (g.height - (d * 2)) * c.zoom.height
		};
		e.bbox = h
	},
	onAnimate : function(b, a) {
		var c = this;
		b.stopAnimation();
		if (c.triggerAfterDraw) {
			return b.animate(Ext.applyIf(a, c.chart.animate))
		} else {
			c.triggerAfterDraw = true;
			return b.animate(Ext.apply(Ext.applyIf(a, c.chart.animate), {
						listeners : {
							afteranimate : function() {
								c.triggerAfterDraw = false;
								c.fireEvent("afterrender")
							}
						}
					}))
		}
	},
	getGutters : function() {
		return [0, 0]
	},
	onItemMouseOver : function(b) {
		var a = this;
		if (b.series === a) {
			if (a.highlight) {
				a.highlightItem(b)
			}
			if (a.tooltip) {
				a.showTip(b)
			}
		}
	},
	onItemMouseOut : function(b) {
		var a = this;
		if (b.series === a) {
			a.unHighlightItem();
			if (a.tooltip) {
				a.hideTip(b)
			}
		}
	},
	onMouseLeave : function() {
		var a = this;
		a.unHighlightItem();
		if (a.tooltip) {
			a.hideTip()
		}
	},
	getItemForPoint : function(a, h) {
		if (!this.items || !this.items.length || this.seriesIsHidden) {
			return null
		}
		var f = this, b = f.items, g = f.bbox, e, c, d;
		if (!Ext.draw.Draw.withinBox(a, h, g)) {
			return null
		}
		for (c = 0, d = b.length; c < d; c++) {
			if (b[c] && this.isItemInPoint(a, h, b[c], c)) {
				return b[c]
			}
		}
		return null
	},
	isItemInPoint : function(a, d, c, b) {
		return false
	},
	hideAll : function() {
		var f = this, b = f.items, e, a, d, c;
		f.seriesIsHidden = true;
		f._prevShowMarkers = f.showMarkers;
		f.showMarkers = false;
		f.hideLabels(0);
		for (d = 0, a = b.length; d < a; d++) {
			e = b[d];
			c = e.sprite;
			if (c) {
				c.setAttributes({
							hidden : true
						}, true)
			}
		}
	},
	showAll : function() {
		var a = this, b = a.chart.animate;
		a.chart.animate = false;
		a.seriesIsHidden = false;
		a.showMarkers = a._prevShowMarkers;
		a.drawSeries();
		a.chart.animate = b
	},
	getLegendColor : function(a) {
		var b = this, d, c;
		if (b.seriesStyle) {
			d = b.seriesStyle.fill;
			c = b.seriesStyle.stroke;
			if (d && d != "none") {
				return d
			}
			return c
		}
		return "#000"
	},
	visibleInLegend : function(a) {
		var b = this.__excludes;
		if (b) {
			return !b[a]
		}
		return !this.seriesIsHidden
	},
	setTitle : function(a, d) {
		var c = this, b = c.title;
		if (Ext.isString(a)) {
			d = a;
			a = 0
		}
		if (Ext.isArray(b)) {
			b[a] = d
		} else {
			c.title = d
		}
		c.fireEvent("titlechange", d, a)
	}
});
Ext.define("Ext.chart.series.Cartesian", {
			extend : "Ext.chart.series.Series",
			alternateClassName : ["Ext.chart.CartesianSeries",
					"Ext.chart.CartesianChart"],
			xField : null,
			yField : null,
			axis : "left"
		});
Ext.define("Ext.chart.series.Area", {
	extend : "Ext.chart.series.Cartesian",
	alias : "series.area",
	requires : ["Ext.chart.axis.Axis", "Ext.draw.Color", "Ext.fx.Anim"],
	type : "area",
	stacked : true,
	style : {},
	constructor : function(c) {
		this.callParent(arguments);
		var e = this, a = e.chart.surface, d, b;
		Ext.apply(e, c, {
					__excludes : [],
					highlightCfg : {
						lineWidth : 3,
						stroke : "#55c",
						opacity : 0.8,
						color : "#f00"
					}
				});
		if (e.highlight) {
			e.highlightSprite = a.add({
						type : "path",
						path : ["M", 0, 0],
						zIndex : 1000,
						opacity : 0.3,
						lineWidth : 5,
						hidden : true,
						stroke : "#444"
					})
		}
		e.group = a.getGroup(e.seriesId)
	},
	shrink : function(b, m, n) {
		var h = b.length, l = Math.floor(h / n), g, f, d = 0, k = this.areas.length, a = [], e = [], c = [];
		for (f = 0; f < k; ++f) {
			a[f] = 0
		}
		for (g = 0; g < h; ++g) {
			d += b[g];
			for (f = 0; f < k; ++f) {
				a[f] += m[g][f]
			}
			if (g % l == 0) {
				e.push(d / l);
				for (f = 0; f < k; ++f) {
					a[f] /= l
				}
				c.push(a);
				d = 0;
				for (f = 0, a = []; f < k; ++f) {
					a[f] = 0
				}
			}
		}
		return {
			x : e,
			y : c
		}
	},
	getBounds : function() {
		var u = this, k = u.chart, g = k.substore || k.store, f = []
				.concat(u.yField), w = f.length, m = [], d = [], v = Infinity, s = v, q = v, r = -v, p = -v, c = Math, t = c.min, z = c.max, a, y, b, l, n, x, i, h, e, j, o;
		u.setBBox();
		a = u.bbox;
		if (u.axis) {
			axis = k.axes.get(u.axis);
			if (axis) {
				out = axis.calcEnds();
				q = out.from || axis.prevMin;
				p = z(out.to || axis.prevMax, 0)
			}
		}
		if (u.yField && !Ext.isNumber(q)) {
			axis = Ext.create("Ext.chart.axis.Axis", {
						chart : k,
						fields : [].concat(u.yField)
					});
			out = axis.calcEnds();
			q = out.from || axis.prevMin;
			p = z(out.to || axis.prevMax, 0)
		}
		if (!Ext.isNumber(q)) {
			q = 0
		}
		if (!Ext.isNumber(p)) {
			p = 0
		}
		g.each(function(A, B) {
					l = A.get(u.xField);
					n = [];
					if (typeof l != "number") {
						l = B
					}
					m.push(l);
					i = 0;
					for (x = 0; x < w; x++) {
						o = A.get(f[x]);
						if (typeof o == "number") {
							q = t(q, o);
							n.push(o);
							i += o
						}
					}
					s = t(s, l);
					r = z(r, l);
					p = z(p, i);
					d.push(n)
				}, u);
		y = a.width / (r - s);
		b = a.height / (p - q);
		h = m.length;
		if ((h > a.width) && u.areas) {
			e = u.shrink(m, d, a.width);
			m = e.x;
			d = e.y
		}
		return {
			bbox : a,
			minX : s,
			minY : q,
			xValues : m,
			yValues : d,
			xScale : y,
			yScale : b,
			areasLen : w
		}
	},
	getPaths : function() {
		var u = this, k = u.chart, c = k.substore || k.store, d = true, e = u
				.getBounds(), a = e.bbox, l = u.items = [], t = [], b, n = [], q, g, h, f, o, r, j, v, p, s, m;
		g = e.xValues.length;
		for (q = 0; q < g; q++) {
			o = e.xValues[q];
			r = e.yValues[q];
			h = a.x + (o - e.minX) * e.xScale;
			j = 0;
			for (v = 0; v < e.areasLen; v++) {
				if (u.__excludes[v]) {
					continue
				}
				if (!t[v]) {
					t[v] = []
				}
				s = r[v];
				j += s;
				f = a.y + a.height - (j - e.minY) * e.yScale;
				if (!n[v]) {
					n[v] = ["M", h, f];
					t[v].push(["L", h, f])
				} else {
					n[v].push("L", h, f);
					t[v].push(["L", h, f])
				}
				if (!l[v]) {
					l[v] = {
						pointsUp : [],
						pointsDown : [],
						series : u
					}
				}
				l[v].pointsUp.push([h, f])
			}
		}
		for (v = 0; v < e.areasLen; v++) {
			if (u.__excludes[v]) {
				continue
			}
			m = n[v];
			if (v == 0 || d) {
				d = false;
				m.push("L", h, a.y + a.height, "L", a.x, a.y + a.height, "Z")
			} else {
				b = t[p];
				b.reverse();
				m.push("L", h, b[0][2]);
				for (q = 0; q < g; q++) {
					m.push(b[q][0], b[q][1], b[q][2]);
					l[v].pointsDown[g - q - 1] = [b[q][1], b[q][2]]
				}
				m.push("L", a.x, m[2], "Z")
			}
			p = v
		}
		return {
			paths : n,
			areasLen : e.areasLen
		}
	},
	drawSeries : function() {
		var g = this, f = g.chart, h = f.substore || f.store, c = f.surface, b = f.animate, j = g.group, a = Ext
				.apply(g.seriesStyle, g.style), k = g.colorArrayStyle, n = k
				&& k.length || 0, d, e, m, l, i;
		g.unHighlightItem();
		g.cleanHighlights();
		if (!h || !h.getCount()) {
			return
		}
		m = g.getPaths();
		if (!g.areas) {
			g.areas = []
		}
		for (d = 0; d < m.areasLen; d++) {
			if (g.__excludes[d]) {
				continue
			}
			if (!g.areas[d]) {
				g.items[d].sprite = g.areas[d] = c.add(Ext.apply({}, {
							type : "path",
							group : j,
							path : m.paths[d],
							stroke : a.stroke || k[d % n],
							fill : k[d % n]
						}, a || {}))
			}
			e = g.areas[d];
			l = m.paths[d];
			if (b) {
				i = g.renderer(e, false, {
							path : l,
							fill : k[d % n],
							stroke : a.stroke || k[d % n]
						}, d, h);
				g.animation = g.onAnimate(e, {
							to : i
						})
			} else {
				i = g.renderer(e, false, {
							path : l,
							hidden : false,
							fill : k[d % n],
							stroke : a.stroke || k[d % n]
						}, d, h);
				g.areas[d].setAttributes(i, true)
			}
		}
		g.renderLabels();
		g.renderCallouts()
	},
	onAnimate : function(b, a) {
		b.show();
		return this.callParent(arguments)
	},
	onCreateLabel : function(d, j, c, e) {
		var f = this, g = f.labelsGroup, a = f.label, h = f.bbox, b = Ext
				.apply(a, f.seriesLabelStyle);
		return f.chart.surface.add(Ext.apply({
					type : "text",
					"text-anchor" : "middle",
					group : g,
					x : j.point[0],
					y : h.y + h.height / 2
				}, b || {}))
	},
	onPlaceLabel : function(f, j, r, o, n, c, e) {
		var t = this, k = t.chart, q = k.resizing, s = t.label, p = s.renderer, b = s.field, a = t.bbox, h = r.point[0], g = r.point[1], d, m, l;
		f.setAttributes({
					text : p(j.get(b[e])),
					hidden : true
				}, true);
		d = f.getBBox();
		m = d.width / 2;
		l = d.height / 2;
		h = h - m < a.x ? a.x + m : h;
		h = (h + m > a.x + a.width) ? (h - (h + m - a.x - a.width)) : h;
		g = g - l < a.y ? a.y + l : g;
		g = (g + l > a.y + a.height) ? (g - (g + l - a.y - a.height)) : g;
		if (t.chart.animate && !t.chart.resizing) {
			f.show(true);
			t.onAnimate(f, {
						to : {
							x : h,
							y : g
						}
					})
		} else {
			f.setAttributes({
						x : h,
						y : g
					}, true);
			if (q) {
				t.animation.on("afteranimate", function() {
							f.show(true)
						})
			} else {
				f.show(true)
			}
		}
	},
	onPlaceCallout : function(l, q, I, F, E, d, j) {
		var L = this, r = L.chart, C = r.surface, G = r.resizing, K = L.callouts, s = L.items, u = (F == 0)
				? false
				: s[F - 1].point, w = (F == s.length - 1)
				? false
				: s[F + 1].point, c = I.point, z, f, M, J, n, o, b = l.label
				.getBBox(), H = 30, B = 10, A = 3, g, e, h, v, t, D = L.clipRect, m, k;
		if (!u) {
			u = c
		}
		if (!w) {
			w = c
		}
		J = (w[1] - u[1]) / (w[0] - u[0]);
		n = (c[1] - u[1]) / (c[0] - u[0]);
		o = (w[1] - c[1]) / (w[0] - c[0]);
		f = Math.sqrt(1 + J * J);
		z = [1 / f, J / f];
		M = [-z[1], z[0]];
		if (n > 0 && o < 0 && M[1] < 0 || n < 0 && o > 0 && M[1] > 0) {
			M[0] *= -1;
			M[1] *= -1
		} else {
			if (Math.abs(n) < Math.abs(o) && M[0] < 0
					|| Math.abs(n) > Math.abs(o) && M[0] > 0) {
				M[0] *= -1;
				M[1] *= -1
			}
		}
		m = c[0] + M[0] * H;
		k = c[1] + M[1] * H;
		g = m + (M[0] > 0 ? 0 : -(b.width + 2 * A));
		e = k - b.height / 2 - A;
		h = b.width + 2 * A;
		v = b.height + 2 * A;
		if (g < D[0] || (g + h) > (D[0] + D[2])) {
			M[0] *= -1
		}
		if (e < D[1] || (e + v) > (D[1] + D[3])) {
			M[1] *= -1
		}
		m = c[0] + M[0] * H;
		k = c[1] + M[1] * H;
		g = m + (M[0] > 0 ? 0 : -(b.width + 2 * A));
		e = k - b.height / 2 - A;
		h = b.width + 2 * A;
		v = b.height + 2 * A;
		l.lines.setAttributes({
					path : ["M", c[0], c[1], "L", m, k, "Z"]
				}, true);
		l.box.setAttributes({
					x : g,
					y : e,
					width : h,
					height : v
				}, true);
		l.label.setAttributes({
					x : m + (M[0] > 0 ? A : -(b.width + A)),
					y : k
				}, true);
		for (t in l) {
			l[t].show(true)
		}
	},
	isItemInPoint : function(h, g, k, c) {
		var f = this, b = k.pointsUp, d = k.pointsDown, m = Math.abs, e = Infinity, a, l, j;
		for (a = 0, l = b.length; a < l; a++) {
			j = [b[a][0], b[a][1]];
			if (e > m(h - j[0])) {
				e = m(h - j[0])
			} else {
				j = b[a - 1];
				if (g >= j[1] && (!d.length || g <= (d[a - 1][1]))) {
					k.storeIndex = a - 1;
					k.storeField = f.yField[c];
					k.storeItem = f.chart.store.getAt(a - 1);
					k._points = d.length ? [j, d[a - 1]] : [j];
					return true
				} else {
					break
				}
			}
		}
		return false
	},
	highlightSeries : function() {
		var a, c, b;
		if (this._index !== undefined) {
			a = this.areas[this._index];
			if (a.__highlightAnim) {
				a.__highlightAnim.paused = true
			}
			a.__highlighted = true;
			a.__prevOpacity = a.__prevOpacity || a.attr.opacity || 1;
			a.__prevFill = a.__prevFill || a.attr.fill;
			a.__prevLineWidth = a.__prevLineWidth || a.attr.lineWidth;
			b = Ext.draw.Color.fromString(a.__prevFill);
			c = {
				lineWidth : (a.__prevLineWidth || 0) + 2
			};
			if (b) {
				c.fill = b.getLighter(0.2).toString()
			} else {
				c.opacity = Math.max(a.__prevOpacity - 0.3, 0)
			}
			if (this.chart.animate) {
				a.__highlightAnim = Ext.create("Ext.fx.Anim", Ext.apply({
									target : a,
									to : c
								}, this.chart.animate))
			} else {
				a.setAttributes(c, true)
			}
		}
	},
	unHighlightSeries : function() {
		var a;
		if (this._index !== undefined) {
			a = this.areas[this._index];
			if (a.__highlightAnim) {
				a.__highlightAnim.paused = true
			}
			if (a.__highlighted) {
				a.__highlighted = false;
				a.__highlightAnim = Ext.create("Ext.fx.Anim", {
							target : a,
							to : {
								fill : a.__prevFill,
								opacity : a.__prevOpacity,
								lineWidth : a.__prevLineWidth
							}
						})
			}
		}
	},
	highlightItem : function(c) {
		var b = this, a, d;
		if (!c) {
			this.highlightSeries();
			return
		}
		a = c._points;
		d = a.length == 2 ? ["M", a[0][0], a[0][1], "L", a[1][0], a[1][1]] : [
				"M", a[0][0], a[0][1], "L", a[0][0], b.bbox.y + b.bbox.height];
		b.highlightSprite.setAttributes({
					path : d,
					hidden : false
				}, true)
	},
	unHighlightItem : function(a) {
		if (!a) {
			this.unHighlightSeries()
		}
		if (this.highlightSprite) {
			this.highlightSprite.hide(true)
		}
	},
	hideAll : function() {
		if (!isNaN(this._index)) {
			this.__excludes[this._index] = true;
			this.areas[this._index].hide(true);
			this.drawSeries()
		}
	},
	showAll : function() {
		if (!isNaN(this._index)) {
			this.__excludes[this._index] = false;
			this.areas[this._index].show(true);
			this.drawSeries()
		}
	},
	getLegendColor : function(a) {
		var b = this;
		return b.colorArrayStyle[a % b.colorArrayStyle.length]
	}
});
Ext.define("Ext.chart.series.Bar", {
	extend : "Ext.chart.series.Cartesian",
	alternateClassName : ["Ext.chart.BarSeries", "Ext.chart.BarChart",
			"Ext.chart.StackedBarChart"],
	requires : ["Ext.chart.axis.Axis", "Ext.fx.Anim"],
	type : "bar",
	alias : "series.bar",
	column : false,
	style : {},
	gutter : 38.2,
	groupGutter : 38.2,
	xPadding : 0,
	yPadding : 10,
	constructor : function(c) {
		this.callParent(arguments);
		var e = this, a = e.chart.surface, f = e.chart.shadow, d, b;
		Ext.apply(e, c, {
					highlightCfg : {
						lineWidth : 3,
						stroke : "#55c",
						opacity : 0.8,
						color : "#f00"
					},
					shadowAttributes : [{
								"stroke-width" : 6,
								"stroke-opacity" : 0.05,
								stroke : "rgb(200, 200, 200)",
								translate : {
									x : 1.2,
									y : 1.2
								}
							}, {
								"stroke-width" : 4,
								"stroke-opacity" : 0.1,
								stroke : "rgb(150, 150, 150)",
								translate : {
									x : 0.9,
									y : 0.9
								}
							}, {
								"stroke-width" : 2,
								"stroke-opacity" : 0.15,
								stroke : "rgb(100, 100, 100)",
								translate : {
									x : 0.6,
									y : 0.6
								}
							}]
				});
		e.group = a.getGroup(e.seriesId + "-bars");
		if (f) {
			for (d = 0, b = e.shadowAttributes.length; d < b; d++) {
				e.shadowGroups.push(a.getGroup(e.seriesId + "-shadows" + d))
			}
		}
	},
	getBarGirth : function() {
		var d = this, a = d.chart.store, b = d.column, c = a.getCount(), e = d.gutter
				/ 100;
		return (d.chart.chartBBox[b ? "width" : "height"] - d[b
				? "xPadding"
				: "yPadding"]
				* 2)
				/ (c * (e + 1) - e)
	},
	getGutters : function() {
		var b = this, a = b.column, c = Math
				.ceil(b[a ? "xPadding" : "yPadding"] + b.getBarGirth() / 2);
		return b.column ? [c, 0] : [0, c]
	},
	getBounds : function() {
		var z = this, p = z.chart, i = p.substore || p.store, q = []
				.concat(z.yField), c = q.length, k = c, h = z.groupGutter / 100, f = z.column, n = z.xPadding, b = z.yPadding, w = z.stacked, o = z
				.getBarGirth(), g = Math, C = g.max, u = g.abs, y, a, x, v, e, s, A, m, B, l, r, t, d;
		z.setBBox(true);
		a = z.bbox;
		if (z.__excludes) {
			for (r = 0, B = z.__excludes.length; r < B; r++) {
				if (z.__excludes[r]) {
					k--
				}
			}
		}
		if (z.axis) {
			e = p.axes.get(z.axis);
			if (e) {
				s = e.calcEnds();
				x = s.from || e.prevMin;
				v = C(s.to || e.prevMax, 0)
			}
		}
		if (z.yField && !Ext.isNumber(x)) {
			e = Ext.create("Ext.chart.axis.Axis", {
						chart : p,
						fields : [].concat(z.yField)
					});
			s = e.calcEnds();
			x = s.from || e.prevMin;
			v = C(s.to || e.prevMax, 0)
		}
		if (!Ext.isNumber(x)) {
			x = 0
		}
		if (!Ext.isNumber(v)) {
			v = 0
		}
		A = (f ? a.height - b * 2 : a.width - n * 2) / (v - x);
		y = o / ((w ? 1 : k) * (h + 1) - h);
		m = (f) ? a.y + a.height - b : a.x + n;
		if (w) {
			B = [[], []];
			i.each(function(j, D) {
						B[0][D] = B[0][D] || 0;
						B[1][D] = B[1][D] || 0;
						for (r = 0; r < c; r++) {
							if (z.__excludes && z.__excludes[r]) {
								continue
							}
							l = j.get(q[r]);
							B[+(l > 0)][D] += u(l)
						}
					});
			B[+(v > 0)].push(u(v));
			B[+(x > 0)].push(u(x));
			d = C.apply(g, B[0]);
			t = C.apply(g, B[1]);
			A = (f ? a.height - b * 2 : a.width - n * 2) / (t + d);
			m = m + d * A * (f ? -1 : 1)
		} else {
			if (x / v < 0) {
				m = m - x * A * (f ? -1 : 1)
			}
		}
		return {
			bars : q,
			bbox : a,
			barsLen : c,
			groupBarsLen : k,
			barWidth : o,
			groupBarWidth : y,
			scale : A,
			zero : m,
			xPadding : n,
			yPadding : b,
			signed : x / v < 0,
			minY : x,
			maxY : v
		}
	},
	getPaths : function() {
		var t = this, O = t.chart, b = O.substore || O.store, C = t.bounds = t
				.getBounds(), x = t.items = [], i = t.gutter / 100, c = t.groupGutter
				/ 100, M = O.animate, H = t.column, v = t.group, k = O.shadow, K = t.shadowGroups, J = t.shadowAttributes, o = K.length, w = C.bbox, l = t.xPadding, p = t.yPadding, L = t.stacked, u = C.barsLen, I = t.colorArrayStyle, g = I
				&& I.length || 0, z = Math, m = z.max, E = z.min, s = z.abs, N, P, e, F, A, a, h, r, q, n, f, d, B, y, G, D;
		b.each(function(j, Q, R) {
					a = C.zero;
					h = C.zero;
					F = 0;
					A = 0;
					r = false;
					for (N = 0, f = 0; N < u; N++) {
						if (t.__excludes && t.__excludes[N]) {
							continue
						}
						P = j.get(C.bars[N]);
						e = Math.round((P - ((C.minY < 0) ? 0 : C.minY))
								* C.scale);
						q = {
							fill : I[(u > 1 ? N : 0) % g]
						};
						if (H) {
							Ext.apply(q, {
										height : e,
										width : m(C.groupBarWidth, 0),
										x : (w.x + l + Q * C.barWidth * (1 + i) + f
												* C.groupBarWidth
												* (1 + c)
												* !L),
										y : a - e
									})
						} else {
							G = (R - 1) - Q;
							Ext.apply(q, {
										height : m(C.groupBarWidth, 0),
										width : e + (a == C.zero),
										x : a + (a != C.zero),
										y : (w.y + p + G * C.barWidth * (1 + i)
												+ f * C.groupBarWidth * (1 + c)
												* !L + 1)
									})
						}
						if (e < 0) {
							if (H) {
								q.y = h;
								q.height = s(e)
							} else {
								q.x = h + e;
								q.width = s(e)
							}
						}
						if (L) {
							if (e < 0) {
								h += e * (H ? -1 : 1)
							} else {
								a += e * (H ? -1 : 1)
							}
							F += s(e);
							if (e < 0) {
								A += s(e)
							}
						}
						q.x = Math.floor(q.x) + 1;
						D = Math.floor(q.y);
						if (!Ext.isIE9 && q.y > D) {
							D--
						}
						q.y = D;
						q.width = Math.floor(q.width);
						q.height = Math.floor(q.height);
						x.push({
									series : t,
									storeItem : j,
									value : [j.get(t.xField), P],
									attr : q,
									point : H ? [q.x + q.width / 2,
											P >= 0 ? q.y : q.y + q.height] : [
											P >= 0 ? q.x + q.width : q.x,
											q.y + q.height / 2]
								});
						if (M && O.resizing) {
							n = H ? {
								x : q.x,
								y : C.zero,
								width : q.width,
								height : 0
							} : {
								x : C.zero,
								y : q.y,
								width : 0,
								height : q.height
							};
							if (k && (L && !r || !L)) {
								r = true;
								for (d = 0; d < o; d++) {
									B = K[d].getAt(L ? Q : (Q * u + N));
									if (B) {
										B.setAttributes(n, true)
									}
								}
							}
							y = v.getAt(Q * u + N);
							if (y) {
								y.setAttributes(n, true)
							}
						}
						f++
					}
					if (L && x.length) {
						x[Q * f].totalDim = F;
						x[Q * f].totalNegDim = A
					}
				}, t)
	},
	renderShadows : function(t, u, x, k) {
		var y = this, o = y.chart, r = o.surface, f = o.animate, w = y.stacked, a = y.shadowGroups, v = y.shadowAttributes, n = a.length, g = o.substore
				|| o.store, d = y.column, q = y.items, b = [], l = k.zero, e, p, h, z, m, s, c;
		if ((w && (t % k.groupBarsLen === 0)) || !w) {
			s = t / k.groupBarsLen;
			for (e = 0; e < n; e++) {
				p = Ext.apply({}, v[e]);
				h = a[e].getAt(w ? s : t);
				Ext.copyTo(p, u, "x,y,width,height");
				if (!h) {
					h = r.add(Ext.apply({
								type : "rect",
								group : a[e]
							}, Ext.apply({}, x, p)))
				}
				if (w) {
					z = q[t].totalDim;
					m = q[t].totalNegDim;
					if (d) {
						p.y = l - m;
						p.height = z
					} else {
						p.x = l - m;
						p.width = z
					}
				}
				if (f) {
					if (!w) {
						c = y.renderer(h, g.getAt(s), p, t, g);
						y.onAnimate(h, {
									to : c
								})
					} else {
						c = y.renderer(h, g.getAt(s), Ext.apply(p, {
											hidden : true
										}), t, g);
						h.setAttributes(c, true)
					}
				} else {
					c = y.renderer(h, g.getAt(s), Ext.apply(p, {
										hidden : false
									}), t, g);
					h.setAttributes(c, true)
				}
				b.push(h)
			}
		}
		return b
	},
	drawSeries : function() {
		var B = this, q = B.chart, l = q.substore || q.store, u = q.surface, h = q.animate, z = B.stacked, d = B.column, b = q.shadow, a = B.shadowGroups, p = a.length, n = B.group, f = B.seriesStyle, r, o, x, w, A, s, c, e, g, m, k, y, t, v;
		if (!l || !l.getCount()) {
			return
		}
		delete f.fill;
		k = Ext.apply(f, this.style);
		B.unHighlightItem();
		B.cleanHighlights();
		B.getPaths();
		m = B.bounds;
		r = B.items;
		A = d ? {
			y : m.zero,
			height : 0
		} : {
			x : m.zero,
			width : 0
		};
		o = r.length;
		for (x = 0; x < o; x++) {
			s = n.getAt(x);
			y = r[x].attr;
			if (b) {
				r[x].shadows = B.renderShadows(x, y, A, m)
			}
			if (!s) {
				t = Ext.apply({}, A, y);
				t = Ext.apply(t, k || {});
				s = u.add(Ext.apply({}, {
							type : "rect",
							group : n
						}, t))
			}
			if (h) {
				c = B.renderer(s, l.getAt(x), y, x, l);
				s._to = c;
				v = B.onAnimate(s, {
							to : Ext.apply(c, k)
						});
				if (b && z && (x % m.barsLen === 0)) {
					w = x / m.barsLen;
					for (e = 0; e < p; e++) {
						v.on("afteranimate", function() {
									this.show(true)
								}, a[e].getAt(w))
					}
				}
			} else {
				c = B.renderer(s, l.getAt(x), Ext.apply(y, {
									hidden : false
								}), x, l);
				s.setAttributes(Ext.apply(c, k), true)
			}
			r[x].sprite = s
		}
		o = n.getCount();
		for (w = x; w < o; w++) {
			n.getAt(w).hide(true)
		}
		if (b) {
			for (e = 0; e < p; e++) {
				g = a[e];
				o = g.getCount();
				for (w = x; w < o; w++) {
					g.getAt(w).hide(true)
				}
			}
		}
		B.renderLabels()
	},
	onCreateLabel : function(e, k, d, f) {
		var g = this, a = g.chart.surface, j = g.labelsGroup, b = g.label, c = Ext
				.apply({}, b, g.seriesLabelStyle || {}), h;
		return a.add(Ext.apply({
					type : "text",
					group : j
				}, c || {}))
	},
	onPlaceLabel : function(g, m, H, A, v, d, e) {
		var L = this, a = L.bounds, K = a.groupBarWidth, c = L.column, o = L.chart, k = o.chartBBox, G = o.resizing, u = H.value[0], E = H.value[1], t = H.attr, J = L.label, z = J.orientation == "vertical", b = []
				.concat(J.field), B = J.renderer, n = B(m.get(b[e])), q = L
				.getLabelSize(n), s = q.width, p = q.height, l = a.zero, I = "outside", C = "insideStart", r = "insideEnd", F = 10, D = 6, f = a.signed, j, h, w;
		g.setAttributes({
					text : n
				});
		if (c) {
			if (v == I) {
				if (p + D + t.height > (E >= 0 ? l - k.y : k.y + k.height - l)) {
					v = r
				}
			} else {
				if (p + D > t.height) {
					v = I
				}
			}
			j = t.x + K / 2;
			h = v == C ? (l + ((p / 2 + 3) * (E >= 0 ? -1 : 1))) : (E >= 0
					? (t.y + ((p / 2 + 3) * (v == I ? -1 : 1)))
					: (t.y + t.height + ((p / 2 + 3) * (v === I ? 1 : -1))))
		} else {
			if (v == I) {
				if (s + F + t.width > (E >= 0 ? k.x + k.width - l : l - k.x)) {
					v = r
				}
			} else {
				if (s + F > t.width) {
					v = I
				}
			}
			j = v == C ? (l + ((s / 2 + 5) * (E >= 0 ? 1 : -1))) : (E >= 0
					? (t.x + t.width + ((s / 2 + 5) * (v === I ? 1 : -1)))
					: (t.x + ((s / 2 + 5) * (v === I ? -1 : 1))));
			h = t.y + K / 2
		}
		w = {
			x : j,
			y : h
		};
		if (z) {
			w.rotate = {
				x : j,
				y : h,
				degrees : 270
			}
		}
		if (d && G) {
			if (c) {
				j = t.x + t.width / 2;
				h = l
			} else {
				j = l;
				h = t.y + t.height / 2
			}
			g.setAttributes({
						x : j,
						y : h
					}, true);
			if (z) {
				g.setAttributes({
							rotate : {
								x : j,
								y : h,
								degrees : 270
							}
						}, true)
			}
		}
		if (d) {
			L.onAnimate(g, {
						to : w
					})
		} else {
			g.setAttributes(Ext.apply(w, {
								hidden : false
							}), true)
		}
	},
	getLabelSize : function(f) {
		var j = this.testerLabel, a = this.label, d = Ext.apply({}, a,
				this.seriesLabelStyle || {}), b = a.orientation === "vertical", i, g, e, c;
		if (!j) {
			j = this.testerLabel = this.chart.surface.add(Ext.apply({
						type : "text",
						opacity : 0
					}, d))
		}
		j.setAttributes({
					text : f
				}, true);
		i = j.getBBox();
		g = i.width;
		e = i.height;
		return {
			width : b ? e : g,
			height : b ? g : e
		}
	},
	onAnimate : function(b, a) {
		b.show();
		return this.callParent(arguments)
	},
	isItemInPoint : function(a, d, b) {
		var c = b.sprite.getBBox();
		return c.x <= a && c.y <= d && (c.x + c.width) >= a
				&& (c.y + c.height) >= d
	},
	hideAll : function() {
		var a = this.chart.axes;
		if (!isNaN(this._index)) {
			if (!this.__excludes) {
				this.__excludes = []
			}
			this.__excludes[this._index] = true;
			this.drawSeries();
			a.each(function(b) {
						b.drawAxis()
					})
		}
	},
	showAll : function() {
		var a = this.chart.axes;
		if (!isNaN(this._index)) {
			if (!this.__excludes) {
				this.__excludes = []
			}
			this.__excludes[this._index] = false;
			this.drawSeries();
			a.each(function(b) {
						b.drawAxis()
					})
		}
	},
	getLegendColor : function(a) {
		var b = this;
		return b.colorArrayStyle[a % b.colorArrayStyle.length]
	}
});
Ext.define("Ext.chart.series.Column", {
			alternateClassName : ["Ext.chart.ColumnSeries",
					"Ext.chart.ColumnChart", "Ext.chart.StackedColumnChart"],
			extend : "Ext.chart.series.Bar",
			type : "column",
			alias : "series.column",
			column : true,
			xPadding : 10,
			yPadding : 0
		});
Ext.define("Ext.chart.series.Gauge", {
	extend : "Ext.chart.series.Series",
	type : "gauge",
	alias : "series.gauge",
	rad : Math.PI / 180,
	highlightDuration : 150,
	angleField : false,
	needle : false,
	donut : false,
	showInLegend : false,
	style : {},
	constructor : function(b) {
		this.callParent(arguments);
		var g = this, f = g.chart, a = f.surface, h = f.store, j = f.shadow, d, c, e;
		Ext.apply(g, b, {
					shadowAttributes : [{
								"stroke-width" : 6,
								"stroke-opacity" : 1,
								stroke : "rgb(200, 200, 200)",
								translate : {
									x : 1.2,
									y : 2
								}
							}, {
								"stroke-width" : 4,
								"stroke-opacity" : 1,
								stroke : "rgb(150, 150, 150)",
								translate : {
									x : 0.9,
									y : 1.5
								}
							}, {
								"stroke-width" : 2,
								"stroke-opacity" : 1,
								stroke : "rgb(100, 100, 100)",
								translate : {
									x : 0.6,
									y : 1
								}
							}]
				});
		g.group = a.getGroup(g.seriesId);
		if (j) {
			for (d = 0, c = g.shadowAttributes.length; d < c; d++) {
				g.shadowGroups.push(a.getGroup(g.seriesId + "-shadows" + d))
			}
		}
		a.customAttributes.segment = function(i) {
			return g.getSegment(i)
		}
	},
	initialize : function() {
		var b = this, a = b.chart.substore || b.chart.store;
		b.yField = [];
		if (b.label.field) {
			a.each(function(c) {
						b.yField.push(c.get(b.label.field))
					})
		}
	},
	getSegment : function(b) {
		var B = this, A = B.rad, d = Math.cos, a = Math.sin, m = Math.abs, j = B.centerX, h = B.centerY, v = 0, u = 0, t = 0, q = 0, g = 0, f = 0, e = 0, c = 0, w = 0.01, l = b.endRho
				- b.startRho, p = b.startAngle, o = b.endAngle, i = (p + o) / 2
				* A, k = b.margin || 0, s = m(o - p) > 180, C = Math.min(p, o)
				* A, z = Math.max(p, o) * A, n = false;
		j += k * d(i);
		h += k * a(i);
		v = j + b.startRho * d(C);
		g = h + b.startRho * a(C);
		u = j + b.endRho * d(C);
		f = h + b.endRho * a(C);
		t = j + b.startRho * d(z);
		e = h + b.startRho * a(z);
		q = j + b.endRho * d(z);
		c = h + b.endRho * a(z);
		if (m(v - t) <= w && m(g - e) <= w) {
			n = true
		}
		if (n) {
			return {
				path : [["M", v, g], ["L", u, f],
						["A", b.endRho, b.endRho, 0, +s, 1, q, c], ["Z"]]
			}
		} else {
			return {
				path : [["M", v, g], ["L", u, f],
						["A", b.endRho, b.endRho, 0, +s, 1, q, c], ["L", t, e],
						["A", b.startRho, b.startRho, 0, +s, 0, v, g], ["Z"]]
			}
		}
	},
	calcMiddle : function(o) {
		var j = this, k = j.rad, n = o.slice, m = j.centerX, l = j.centerY, i = n.startAngle, e = n.endAngle, h = Math
				.max(("rho" in n) ? n.rho : j.radius, j.label.minMargin), g = +j.donut, b = Math
				.min(i, e)
				* k, a = Math.max(i, e) * k, d = -(b + (a - b) / 2), f = m
				+ (o.endRho + o.startRho) / 2 * Math.cos(d), c = l
				- (o.endRho + o.startRho) / 2 * Math.sin(d);
		o.middle = {
			x : f,
			y : c
		}
	},
	drawSeries : function() {
		var v = this, V = v.chart, b = V.substore || V.store, z = v.group, R = v.chart.animate, C = v.chart.axes
				.get(0), D = C && C.minimum || v.minimum || 0, H = C
				&& C.maximum || v.maximum || 0, m = v.angleField || v.field
				|| v.xField, L = V.surface, G = V.chartBBox, g = v.rad, c = +v.donut, W = {}, A = [], l = v.seriesStyle, a = v.seriesLabelStyle, f = v.colorArrayStyle, y = f
				&& f.length || 0, J = V.maxGutter[0], I = V.maxGutter[1], h = Math.cos, r = Math.sin, s, e, d, u, q, B, N, E, F, K, T, S, k, U, w, n, P, Q, o, x, t, O, M;
		Ext.apply(l, v.style || {});
		v.setBBox();
		x = v.bbox;
		if (v.colorSet) {
			f = v.colorSet;
			y = f.length
		}
		if (!b || !b.getCount()) {
			return
		}
		e = v.centerX = G.x + (G.width / 2);
		d = v.centerY = G.y + G.height;
		v.radius = Math.min(e - G.x, d - G.y);
		v.slices = q = [];
		v.items = A = [];
		if (!v.value) {
			K = b.getAt(0);
			v.value = K.get(m)
		}
		N = v.value;
		if (v.needle) {
			O = {
				series : v,
				value : N,
				startAngle : -180,
				endAngle : 0,
				rho : v.radius
			};
			t = -180 * (1 - (N - D) / (H - D));
			q.push(O)
		} else {
			t = -180 * (1 - (N - D) / (H - D));
			O = {
				series : v,
				value : N,
				startAngle : -180,
				endAngle : t,
				rho : v.radius
			};
			M = {
				series : v,
				value : v.maximum - N,
				startAngle : t,
				endAngle : 0,
				rho : v.radius
			};
			q.push(O, M)
		}
		for (T = 0, F = q.length; T < F; T++) {
			u = q[T];
			B = z.getAt(T);
			s = Ext.apply({
						segment : {
							startAngle : u.startAngle,
							endAngle : u.endAngle,
							margin : 0,
							rho : u.rho,
							startRho : u.rho * +c / 100,
							endRho : u.rho
						}
					}, Ext.apply(l, f && {
								fill : f[T % y]
							} || {}));
			E = Ext.apply({}, s.segment, {
						slice : u,
						series : v,
						storeItem : K,
						index : T
					});
			A[T] = E;
			if (!B) {
				o = Ext.apply({
							type : "path",
							group : z
						}, Ext.apply(l, f && {
									fill : f[T % y]
								} || {}));
				B = L.add(Ext.apply(o, s))
			}
			u.sprite = u.sprite || [];
			E.sprite = B;
			u.sprite.push(B);
			if (R) {
				s = v.renderer(B, K, s, T, b);
				B._to = s;
				v.onAnimate(B, {
							to : s
						})
			} else {
				s = v.renderer(B, K, Ext.apply(s, {
									hidden : false
								}), T, b);
				B.setAttributes(s, true)
			}
		}
		if (v.needle) {
			t = t * Math.PI / 180;
			if (!v.needleSprite) {
				v.needleSprite = v.chart.surface.add({
					type : "path",
					path : ["M", e + (v.radius * +c / 100) * h(t),
							d + -Math.abs((v.radius * +c / 100) * r(t)), "L",
							e + v.radius * h(t), d + -Math.abs(v.radius * r(t))],
					"stroke-width" : 4,
					stroke : "#222"
				})
			} else {
				if (R) {
					v.onAnimate(v.needleSprite, {
						to : {
							path : [
									"M",
									e + (v.radius * +c / 100) * h(t),
									d + -Math.abs((v.radius * +c / 100) * r(t)),
									"L", e + v.radius * h(t),
									d + -Math.abs(v.radius * r(t))]
						}
					})
				} else {
					v.needleSprite.setAttributes({
								type : "path",
								path : [
										"M",
										e + (v.radius * +c / 100) * h(t),
										d
												+ -Math
														.abs((v.radius * +c / 100)
																* r(t)), "L",
										e + v.radius * h(t),
										d + -Math.abs(v.radius * r(t))]
							})
				}
			}
			v.needleSprite.setAttributes({
						hidden : false
					}, true)
		}
		delete v.value
	},
	setValue : function(a) {
		this.value = a;
		this.drawSeries()
	},
	onCreateLabel : function(c, b, a, d) {
	},
	onPlaceLabel : function(c, f, e, d, g, a, b) {
	},
	onPlaceCallout : function() {
	},
	onAnimate : function(b, a) {
		b.show();
		return this.callParent(arguments)
	},
	isItemInPoint : function(a, d, c, b) {
		return false
	},
	showAll : function() {
		if (!isNaN(this._index)) {
			this.__excludes[this._index] = false;
			this.drawSeries()
		}
	},
	getLegendColor : function(a) {
		var b = this;
		return b.colorArrayStyle[a % b.colorArrayStyle.length]
	}
});
Ext.define("Ext.chart.series.Line", {
	extend : "Ext.chart.series.Cartesian",
	alternateClassName : ["Ext.chart.LineSeries", "Ext.chart.LineChart"],
	requires : ["Ext.chart.axis.Axis", "Ext.chart.Shape", "Ext.draw.Draw",
			"Ext.fx.Anim"],
	type : "line",
	alias : "series.line",
	selectionTolerance : 20,
	showMarkers : true,
	markerConfig : {},
	style : {},
	smooth : false,
	fill : false,
	constructor : function(c) {
		this.callParent(arguments);
		var e = this, a = e.chart.surface, f = e.chart.shadow, d, b;
		Ext.apply(e, c, {
					highlightCfg : {
						"stroke-width" : 3
					},
					shadowAttributes : [{
								"stroke-width" : 6,
								"stroke-opacity" : 0.05,
								stroke : "rgb(0, 0, 0)",
								translate : {
									x : 1,
									y : 1
								}
							}, {
								"stroke-width" : 4,
								"stroke-opacity" : 0.1,
								stroke : "rgb(0, 0, 0)",
								translate : {
									x : 1,
									y : 1
								}
							}, {
								"stroke-width" : 2,
								"stroke-opacity" : 0.15,
								stroke : "rgb(0, 0, 0)",
								translate : {
									x : 1,
									y : 1
								}
							}]
				});
		e.group = a.getGroup(e.seriesId);
		if (e.showMarkers) {
			e.markerGroup = a.getGroup(e.seriesId + "-markers")
		}
		if (f) {
			for (d = 0, b = this.shadowAttributes.length; d < b; d++) {
				e.shadowGroups.push(a.getGroup(e.seriesId + "-shadows" + d))
			}
		}
	},
	shrink : function(b, j, k) {
		var g = b.length, h = Math.floor(g / k), f = 1, d = 0, a = 0, e = [b[0]], c = [j[0]];
		for (; f < g; ++f) {
			d += b[f] || 0;
			a += j[f] || 0;
			if (f % h == 0) {
				e.push(d / h);
				c.push(a / h);
				d = 0;
				a = 0
			}
		}
		return {
			x : e,
			y : c
		}
	},
	drawSeries : function() {
		var t = this, am = t.chart, d = am.substore || am.store, Z = am.surface, O = am.chartBBox, A = {}, z = t.group, S = am.maxGutter[0], R = am.maxGutter[1], p = t.showMarkers, an = t.markerGroup, k = am.shadow, af = t.shadowGroups, ae = this.shadowAttributes, aq = af.length, ai = ["M"], ad = ["M"], h = am.markerIndex, Y = []
				.concat(t.axis), ah, K, W = [], ab = [], G = false, u = t.markerStyle, l = t.seriesStyle, c = t.seriesLabelStyle, g = t.colorArrayStyle, w = g
				&& g.length || 0, L = t.seriesIdx, H, Q, J, v, r, f, o, V, U, b, a, N, s, al, ak, M, D, aj, ao, T, I, E, ap, n, q, ag, aa, C, X, B, m, ar, e, ac, at, F, P;
		if (!d || !d.getCount()) {
			return
		}
		e = Ext.apply(u, t.markerConfig);
		at = e.type;
		delete e.type;
		ac = Ext.apply(l, t.style);
		if (!ac["stroke-width"]) {
			ac["stroke-width"] = 0.5
		}
		if (h && an && an.getCount()) {
			for (al = 0; al < h; al++) {
				ao = an.getAt(al);
				an.remove(ao);
				an.add(ao);
				T = an.getAt(an.getCount() - 2);
				ao.setAttributes({
							x : 0,
							y : 0,
							translate : {
								x : T.attr.translation.x,
								y : T.attr.translation.y
							}
						}, true)
			}
		}
		t.unHighlightItem();
		t.cleanHighlights();
		t.setBBox();
		A = t.bbox;
		t.clipRect = [A.x, A.y, A.width, A.height];
		for (al = 0, M = Y.length; al < M; al++) {
			D = am.axes.get(Y[al]);
			if (D) {
				aj = D.calcEnds();
				if (D.position == "top" || D.position == "bottom") {
					aa = aj.from;
					C = aj.to
				} else {
					X = aj.from;
					B = aj.to
				}
			}
		}
		if (t.xField && !Ext.isNumber(aa)
				&& (t.axis == "bottom" || t.axis == "top")) {
			D = Ext.create("Ext.chart.axis.Axis", {
						chart : am,
						fields : [].concat(t.xField)
					}).calcEnds();
			aa = D.from;
			C = D.to
		}
		if (t.yField && !Ext.isNumber(X)
				&& (t.axis == "right" || t.axis == "left")) {
			D = Ext.create("Ext.chart.axis.Axis", {
						chart : am,
						fields : [].concat(t.yField)
					}).calcEnds();
			X = D.from;
			B = D.to
		}
		if (isNaN(aa)) {
			aa = 0;
			q = A.width / (d.getCount() - 1)
		} else {
			q = A.width / (C - aa)
		}
		if (isNaN(X)) {
			X = 0;
			ag = A.height / (d.getCount() - 1)
		} else {
			ag = A.height / (B - X)
		}
		d.each(function(j, x) {
					E = j.get(t.xField);
					ap = j.get(t.yField);
					if (typeof ap == "undefined"
							|| (typeof ap == "string" && !ap)) {
						return
					}
					if (typeof E == "string" || typeof E == "object"
							|| (t.axis != "top" && t.axis != "bottom")) {
						E = x
					}
					if (typeof ap == "string" || typeof ap == "object"
							|| (t.axis != "left" && t.axis != "right")) {
						ap = x
					}
					W.push(E);
					ab.push(ap)
				}, t);
		M = W.length;
		if (M > A.width) {
			n = t.shrink(W, ab, A.width);
			W = n.x;
			ab = n.y
		}
		t.items = [];
		M = W.length;
		for (al = 0; al < M; al++) {
			E = W[al];
			ap = ab[al];
			if (ap === false) {
				if (ad.length == 1) {
					ad = []
				}
				G = true;
				t.items.push(false);
				continue
			} else {
				V = (A.x + (E - aa) * q).toFixed(2);
				U = ((A.y + A.height) - (ap - X) * ag).toFixed(2);
				if (G) {
					G = false;
					ad.push("M")
				}
				ad = ad.concat([V, U])
			}
			if ((typeof N == "undefined") && (typeof U != "undefined")) {
				N = U
			}
			if (!t.line || am.resizing) {
				ai = ai.concat([V, A.y + A.height / 2])
			}
			if (am.animate && am.resizing && t.line) {
				t.line.setAttributes({
							path : ai
						}, true);
				if (t.fillPath) {
					t.fillPath.setAttributes({
								path : ai,
								opacity : 0.2
							}, true)
				}
				if (t.line.shadows) {
					H = t.line.shadows;
					for (ak = 0, aq = H.length; ak < aq; ak++) {
						Q = H[ak];
						Q.setAttributes({
									path : ai
								}, true)
					}
				}
			}
			if (p) {
				ao = an.getAt(al);
				if (!ao) {
					ao = Ext.chart.Shape[at](Z, Ext.apply({
										group : [z, an],
										x : 0,
										y : 0,
										translate : {
											x : b || V,
											y : a || (A.y + A.height / 2)
										},
										value : '"' + E + ", " + ap + '"'
									}, e));
					ao._to = {
						translate : {
							x : V,
							y : U
						}
					}
				} else {
					ao.setAttributes({
								value : '"' + E + ", " + ap + '"',
								x : 0,
								y : 0,
								hidden : false
							}, true);
					ao._to = {
						translate : {
							x : V,
							y : U
						}
					}
				}
			}
			t.items.push({
						series : t,
						value : [E, ap],
						point : [V, U],
						sprite : ao,
						storeItem : d.getAt(al)
					});
			b = V;
			a = U
		}
		if (ad.length <= 1) {
			return
		}
		if (t.smooth) {
			ad = Ext.draw.Draw.smooth(ad, 6)
		}
		if (am.markerIndex && t.previousPath) {
			v = t.previousPath;
			v.splice(1, 2)
		} else {
			v = ad
		}
		if (!t.line) {
			t.line = Z.add(Ext.apply({
						type : "path",
						group : z,
						path : ai,
						stroke : ac.stroke || ac.fill
					}, ac || {}));
			t.line.setAttributes({
						fill : "none"
					});
			if (!ac.stroke && w) {
				t.line.setAttributes({
							stroke : g[L % w]
						}, true)
			}
			if (k) {
				H = t.line.shadows = [];
				for (J = 0; J < aq; J++) {
					K = ae[J];
					K = Ext.apply({}, K, {
								path : ai
							});
					Q = am.surface.add(Ext.apply({}, {
								type : "path",
								group : af[J]
							}, K));
					H.push(Q)
				}
			}
		}
		if (t.fill) {
			f = ad.concat([["L", V, A.y + A.height],
					["L", A.x, A.y + A.height], ["L", A.x, N]]);
			if (!t.fillPath) {
				t.fillPath = Z.add({
							group : z,
							type : "path",
							opacity : ac.opacity || 0.3,
							fill : g[L % w] || ac.fill,
							path : ai
						})
			}
		}
		s = p && an.getCount();
		if (am.animate) {
			r = t.fill;
			m = t.line;
			o = t.renderer(m, false, {
						path : ad
					}, al, d);
			Ext.apply(o, ac || {}, {
						stroke : ac.stroke || ac.fill
					});
			delete o.fill;
			if (am.markerIndex && t.previousPath) {
				t.animation = ar = t.onAnimate(m, {
							to : o,
							from : {
								path : v
							}
						})
			} else {
				t.animation = ar = t.onAnimate(m, {
							to : o
						})
			}
			if (k) {
				H = m.shadows;
				for (ak = 0; ak < aq; ak++) {
					if (am.markerIndex && t.previousPath) {
						t.onAnimate(H[ak], {
									to : {
										path : ad
									},
									from : {
										path : v
									}
								})
					} else {
						t.onAnimate(H[ak], {
									to : {
										path : ad
									}
								})
					}
				}
			}
			if (r) {
				t.onAnimate(t.fillPath, {
							to : Ext.apply({}, {
										path : f,
										fill : g[L % w] || ac.fill
									}, ac || {})
						})
			}
			if (p) {
				for (al = 0; al < M; al++) {
					I = an.getAt(al);
					if (I) {
						if (t.items[al]) {
							o = t.renderer(I, d.getAt(al), I._to, al, d);
							t.onAnimate(I, {
										to : Ext.apply(o, e || {})
									})
						} else {
							I.setAttributes(Ext.apply({
												hidden : true
											}, I._to), true)
						}
					}
				}
				for (; al < s; al++) {
					I = an.getAt(al);
					I.hide(true)
				}
			}
		} else {
			o = t.renderer(t.line, false, {
						path : ad,
						hidden : false
					}, al, d);
			Ext.apply(o, ac || {}, {
						stroke : ac.stroke || ac.fill
					});
			delete o.fill;
			t.line.setAttributes(o, true);
			if (k) {
				H = t.line.shadows;
				for (ak = 0; ak < aq; ak++) {
					H[ak].setAttributes({
								path : ad
							}, true)
				}
			}
			if (t.fill) {
				t.fillPath.setAttributes({
							path : f
						}, true)
			}
			if (p) {
				for (al = 0; al < M; al++) {
					I = an.getAt(al);
					if (I) {
						if (t.items[al]) {
							o = t.renderer(I, d.getAt(al), I._to, al, d);
							I.setAttributes(Ext.apply(e || {}, o || {}), true)
						} else {
							I.hide(true)
						}
					}
				}
				for (; al < s; al++) {
					I = an.getAt(al);
					I.hide(true)
				}
			}
		}
		if (am.markerIndex) {
			ad.splice(1, 0, ad[1], ad[2]);
			t.previousPath = ad
		}
		t.renderLabels();
		t.renderCallouts()
	},
	onCreateLabel : function(d, j, c, e) {
		var f = this, g = f.labelsGroup, a = f.label, h = f.bbox, b = Ext
				.apply(a, f.seriesLabelStyle);
		return f.chart.surface.add(Ext.apply({
					type : "text",
					"text-anchor" : "middle",
					group : g,
					x : j.point[0],
					y : h.y + h.height / 2
				}, b || {}))
	},
	onPlaceLabel : function(f, j, r, o, n, d) {
		var t = this, k = t.chart, q = k.resizing, s = t.label, p = s.renderer, b = s.field, a = t.bbox, h = r.point[0], g = r.point[1], c = r.sprite.attr.radius, e, m, l;
		f.setAttributes({
					text : p(j.get(b)),
					hidden : true
				}, true);
		if (n == "rotate") {
			f.setAttributes({
						"text-anchor" : "start",
						rotation : {
							x : h,
							y : g,
							degrees : -45
						}
					}, true);
			e = f.getBBox();
			m = e.width;
			l = e.height;
			h = h < a.x ? a.x : h;
			h = (h + m > a.x + a.width) ? (h - (h + m - a.x - a.width)) : h;
			g = (g - l < a.y) ? a.y + l : g
		} else {
			if (n == "under" || n == "over") {
				e = r.sprite.getBBox();
				e.width = e.width || (c * 2);
				e.height = e.height || (c * 2);
				g = g + (n == "over" ? -e.height : e.height);
				e = f.getBBox();
				m = e.width / 2;
				l = e.height / 2;
				h = h - m < a.x ? a.x + m : h;
				h = (h + m > a.x + a.width) ? (h - (h + m - a.x - a.width)) : h;
				g = g - l < a.y ? a.y + l : g;
				g = (g + l > a.y + a.height)
						? (g - (g + l - a.y - a.height))
						: g
			}
		}
		if (t.chart.animate && !t.chart.resizing) {
			f.show(true);
			t.onAnimate(f, {
						to : {
							x : h,
							y : g
						}
					})
		} else {
			f.setAttributes({
						x : h,
						y : g
					}, true);
			if (q) {
				t.animation.on("afteranimate", function() {
							f.show(true)
						})
			} else {
				f.show(true)
			}
		}
	},
	highlightItem : function() {
		var a = this;
		a.callParent(arguments);
		if (this.line && !this.highlighted) {
			if (!("__strokeWidth" in this.line)) {
				this.line.__strokeWidth = this.line.attr["stroke-width"] || 0
			}
			if (this.line.__anim) {
				this.line.__anim.paused = true
			}
			this.line.__anim = Ext.create("Ext.fx.Anim", {
						target : this.line,
						to : {
							"stroke-width" : this.line.__strokeWidth + 3
						}
					});
			this.highlighted = true
		}
	},
	unHighlightItem : function() {
		var a = this;
		a.callParent(arguments);
		if (this.line && this.highlighted) {
			this.line.__anim = Ext.create("Ext.fx.Anim", {
						target : this.line,
						to : {
							"stroke-width" : this.line.__strokeWidth
						}
					});
			this.highlighted = false
		}
	},
	onPlaceCallout : function(l, q, I, F, E, d, j) {
		if (!E) {
			return
		}
		var L = this, r = L.chart, C = r.surface, G = r.resizing, K = L.callouts, s = L.items, u = F == 0
				? false
				: s[F - 1].point, w = (F == s.length - 1)
				? false
				: s[F + 1].point, c = [+I.point[0], +I.point[1]], z, f, M, J, n, o, H = K.offsetFromViz
				|| 30, B = K.offsetToSide || 10, A = K.offsetBox || 3, g, e, h, v, t, D = L.clipRect, b = {
			width : K.styles.width || 10,
			height : K.styles.height || 10
		}, m, k;
		if (!u) {
			u = c
		}
		if (!w) {
			w = c
		}
		J = (w[1] - u[1]) / (w[0] - u[0]);
		n = (c[1] - u[1]) / (c[0] - u[0]);
		o = (w[1] - c[1]) / (w[0] - c[0]);
		f = Math.sqrt(1 + J * J);
		z = [1 / f, J / f];
		M = [-z[1], z[0]];
		if (n > 0 && o < 0 && M[1] < 0 || n < 0 && o > 0 && M[1] > 0) {
			M[0] *= -1;
			M[1] *= -1
		} else {
			if (Math.abs(n) < Math.abs(o) && M[0] < 0
					|| Math.abs(n) > Math.abs(o) && M[0] > 0) {
				M[0] *= -1;
				M[1] *= -1
			}
		}
		m = c[0] + M[0] * H;
		k = c[1] + M[1] * H;
		g = m + (M[0] > 0 ? 0 : -(b.width + 2 * A));
		e = k - b.height / 2 - A;
		h = b.width + 2 * A;
		v = b.height + 2 * A;
		if (g < D[0] || (g + h) > (D[0] + D[2])) {
			M[0] *= -1
		}
		if (e < D[1] || (e + v) > (D[1] + D[3])) {
			M[1] *= -1
		}
		m = c[0] + M[0] * H;
		k = c[1] + M[1] * H;
		g = m + (M[0] > 0 ? 0 : -(b.width + 2 * A));
		e = k - b.height / 2 - A;
		h = b.width + 2 * A;
		v = b.height + 2 * A;
		if (r.animate) {
			L.onAnimate(l.lines, {
						to : {
							path : ["M", c[0], c[1], "L", m, k, "Z"]
						}
					});
			if (l.panel) {
				l.panel.setPosition(g, e, true)
			}
		} else {
			l.lines.setAttributes({
						path : ["M", c[0], c[1], "L", m, k, "Z"]
					}, true);
			if (l.panel) {
				l.panel.setPosition(g, e)
			}
		}
		for (t in l) {
			l[t].show(true)
		}
	},
	isItemInPoint : function(h, f, z, p) {
		var B = this, m = B.items, r = B.selectionTolerance, j = null, w, c, o, u, g, v, b, s, a, k, A, e, d, n, t, q, C = Math.sqrt, l = Math.abs;
		c = m[p];
		w = p && m[p - 1];
		if (p >= g) {
			w = m[g - 1]
		}
		o = w && w.point;
		u = c && c.point;
		v = w ? o[0] : u[0] - r;
		b = w ? o[1] : u[1];
		s = c ? u[0] : o[0] + r;
		a = c ? u[1] : o[1];
		e = C((h - v) * (h - v) + (f - b) * (f - b));
		d = C((h - s) * (h - s) + (f - a) * (f - a));
		n = Math.min(e, d);
		if (n <= r) {
			return n == e ? w : c
		}
		return false
	},
	toggleAll : function(a) {
		var e = this, b, d, f, c;
		if (!a) {
			Ext.chart.series.Line.superclass.hideAll.call(e)
		} else {
			Ext.chart.series.Line.superclass.showAll.call(e)
		}
		if (e.line) {
			e.line.setAttributes({
						hidden : !a
					}, true);
			if (e.line.shadows) {
				for (b = 0, c = e.line.shadows, d = c.length; b < d; b++) {
					f = c[b];
					f.setAttributes({
								hidden : !a
							}, true)
				}
			}
		}
		if (e.fillPath) {
			e.fillPath.setAttributes({
						hidden : !a
					}, true)
		}
	},
	hideAll : function() {
		this.toggleAll(false)
	},
	showAll : function() {
		this.toggleAll(true)
	}
});
Ext.define("Ext.chart.series.Pie", {
	alternateClassName : ["Ext.chart.PieSeries", "Ext.chart.PieChart"],
	extend : "Ext.chart.series.Series",
	type : "pie",
	alias : "series.pie",
	rad : Math.PI / 180,
	highlightDuration : 150,
	angleField : false,
	lengthField : false,
	donut : false,
	showInLegend : false,
	style : {},
	constructor : function(b) {
		this.callParent(arguments);
		var g = this, f = g.chart, a = f.surface, h = f.store, j = f.shadow, d, c, e;
		Ext.applyIf(g, {
					highlightCfg : {
						segment : {
							margin : 20
						}
					}
				});
		Ext.apply(g, b, {
					shadowAttributes : [{
								"stroke-width" : 6,
								"stroke-opacity" : 1,
								stroke : "rgb(200, 200, 200)",
								translate : {
									x : 1.2,
									y : 2
								}
							}, {
								"stroke-width" : 4,
								"stroke-opacity" : 1,
								stroke : "rgb(150, 150, 150)",
								translate : {
									x : 0.9,
									y : 1.5
								}
							}, {
								"stroke-width" : 2,
								"stroke-opacity" : 1,
								stroke : "rgb(100, 100, 100)",
								translate : {
									x : 0.6,
									y : 1
								}
							}]
				});
		g.group = a.getGroup(g.seriesId);
		if (j) {
			for (d = 0, c = g.shadowAttributes.length; d < c; d++) {
				g.shadowGroups.push(a.getGroup(g.seriesId + "-shadows" + d))
			}
		}
		a.customAttributes.segment = function(i) {
			return g.getSegment(i)
		}
	},
	initialize : function() {
		var b = this, a = b.chart.substore || b.chart.store;
		b.yField = [];
		if (b.label.field) {
			a.each(function(c) {
						b.yField.push(c.get(b.label.field))
					})
		}
	},
	getSegment : function(b) {
		var B = this, A = B.rad, d = Math.cos, a = Math.sin, m = Math.abs, j = B.centerX, h = B.centerY, v = 0, u = 0, t = 0, q = 0, g = 0, f = 0, e = 0, c = 0, w = 0.01, l = b.endRho
				- b.startRho, p = b.startAngle, o = b.endAngle, i = (p + o) / 2
				* A, k = b.margin || 0, s = m(o - p) > 180, C = Math.min(p, o)
				* A, z = Math.max(p, o) * A, n = false;
		j += k * d(i);
		h += k * a(i);
		v = j + b.startRho * d(C);
		g = h + b.startRho * a(C);
		u = j + b.endRho * d(C);
		f = h + b.endRho * a(C);
		t = j + b.startRho * d(z);
		e = h + b.startRho * a(z);
		q = j + b.endRho * d(z);
		c = h + b.endRho * a(z);
		if (m(v - t) <= w && m(g - e) <= w) {
			n = true
		}
		if (n) {
			return {
				path : [["M", v, g], ["L", u, f],
						["A", b.endRho, b.endRho, 0, +s, 1, q, c], ["Z"]]
			}
		} else {
			return {
				path : [["M", v, g], ["L", u, f],
						["A", b.endRho, b.endRho, 0, +s, 1, q, c], ["L", t, e],
						["A", b.startRho, b.startRho, 0, +s, 0, v, g], ["Z"]]
			}
		}
	},
	calcMiddle : function(n) {
		var i = this, j = i.rad, m = n.slice, l = i.centerX, k = i.centerY, h = m.startAngle, e = m.endAngle, g = +i.donut, b = Math
				.min(h, e)
				* j, a = Math.max(h, e) * j, d = -(b + (a - b) / 2), f = l
				+ (n.endRho + n.startRho) / 2 * Math.cos(d), c = k
				- (n.endRho + n.startRho) / 2 * Math.sin(d);
		n.middle = {
			x : f,
			y : c
		}
	},
	drawSeries : function() {
		var x = this, b = x.chart.substore || x.chart.store, D = x.group, ac = x.chart.animate, o = x.angleField
				|| x.field || x.xField, G = [].concat(x.lengthField), ab = 0, U = x.colorSet, ah = x.chart, R = ah.surface, M = ah.chartBBox, l = ah.shadow, Z = x.shadowGroups, Y = x.shadowAttributes, al = Z.length, g = x.rad, S = G.length, H = 0, d = +x.donut, aj = [], ak = {}, ai, E = [], h = false, A = 0, V = 0, k = 9, am = true, z = 0, n = x.seriesStyle, a = x.seriesLabelStyle, f = x.colorArrayStyle, C = f
				&& f.length || 0, P = ah.maxGutter[0], O = ah.maxGutter[1], u, aa, ag, I, N, K, e, c, v, r = 0, w, t, F, T, J, an, L, Q, ae, ad, m, af, y, q, W, X, s, B;
		Ext.apply(n, x.style || {});
		x.setBBox();
		B = x.bbox;
		if (x.colorSet) {
			f = x.colorSet;
			C = f.length
		}
		if (!b || !b.getCount()) {
			return
		}
		x.unHighlightItem();
		x.cleanHighlights();
		e = x.centerX = M.x + (M.width / 2);
		c = x.centerY = M.y + (M.height / 2);
		x.radius = Math.min(e - M.x, c - M.y);
		x.slices = t = [];
		x.items = E = [];
		b.each(function(j, p) {
					if (this.__excludes && this.__excludes[p]) {
						return
					}
					A += +j.get(o);
					if (G[0]) {
						for (ad = 0, ab = 0; ad < S; ad++) {
							ab += +j.get(G[ad])
						}
						aj[p] = ab;
						V = Math.max(V, ab)
					}
				}, this);
		b.each(function(j, p) {
					if (this.__excludes && this.__excludes[p]) {
						return
					}
					T = j.get(o);
					y = z - 360 * T / A / 2;
					if (isNaN(y)) {
						y = 360;
						T = 1;
						A = 1
					}
					if (!p || r == 0) {
						z = 360 - y;
						x.firstAngle = z;
						y = z - 360 * T / A / 2
					}
					af = z - 360 * T / A;
					w = {
						series : x,
						value : T,
						startAngle : z,
						endAngle : af,
						storeItem : j
					};
					if (G[0]) {
						an = aj[p];
						w.rho = x.radius * (an / V)
					} else {
						w.rho = x.radius
					}
					t[p] = w;
					if ((w.startAngle % 360) == (w.endAngle % 360)) {
						w.startAngle -= 0.0001
					}
					z = af;
					r++
				}, x);
		if (l) {
			for (ae = 0, L = t.length; ae < L; ae++) {
				if (this.__excludes && this.__excludes[ae]) {
					continue
				}
				w = t[ae];
				w.shadowAttrs = [];
				for (ad = 0, H = 0, I = []; ad < S; ad++) {
					F = D.getAt(ae * S + ad);
					v = G[ad] ? b.getAt(ae).get(G[ad]) / aj[ae] * w.rho : w.rho;
					u = {
						segment : {
							startAngle : w.startAngle,
							endAngle : w.endAngle,
							margin : 0,
							rho : w.rho,
							startRho : H + (v * d / 100),
							endRho : H + v
						}
					};
					for (K = 0, I = []; K < al; K++) {
						ag = Y[K];
						N = Z[K].getAt(ae);
						if (!N) {
							N = ah.surface.add(Ext.apply({}, {
										type : "path",
										group : Z[K],
										strokeLinejoin : "round"
									}, u, ag))
						}
						if (ac) {
							u = x.renderer(N, b.getAt(ae),
									Ext.apply({}, u, ag), ae, b);
							x.onAnimate(N, {
										to : u
									})
						} else {
							u = x.renderer(N, b.getAt(ae), Ext.apply(ag, {
												hidden : false
											}), ae, b);
							N.setAttributes(u, true)
						}
						I.push(N)
					}
					w.shadowAttrs[ad] = I
				}
			}
		}
		for (ae = 0, L = t.length; ae < L; ae++) {
			if (this.__excludes && this.__excludes[ae]) {
				continue
			}
			w = t[ae];
			for (ad = 0, H = 0; ad < S; ad++) {
				F = D.getAt(ae * S + ad);
				v = G[ad] ? b.getAt(ae).get(G[ad]) / aj[ae] * w.rho : w.rho;
				u = Ext.apply({
							segment : {
								startAngle : w.startAngle,
								endAngle : w.endAngle,
								margin : 0,
								rho : w.rho,
								startRho : H + (v * d / 100),
								endRho : H + v
							}
						}, Ext.apply(n, f && {
									fill : f[(S > 1 ? ad : ae) % C]
								} || {}));
				J = Ext.apply({}, u.segment, {
							slice : w,
							series : x,
							storeItem : w.storeItem,
							index : ae
						});
				x.calcMiddle(J);
				if (l) {
					J.shadows = w.shadowAttrs[ad]
				}
				E[ae] = J;
				if (!F) {
					s = Ext.apply({
								type : "path",
								group : D,
								middle : J.middle
							}, Ext.apply(n, f && {
										fill : f[(S > 1 ? ad : ae) % C]
									} || {}));
					F = R.add(Ext.apply(s, u))
				}
				w.sprite = w.sprite || [];
				J.sprite = F;
				w.sprite.push(F);
				w.point = [J.middle.x, J.middle.y];
				if (ac) {
					u = x.renderer(F, b.getAt(ae), u, ae, b);
					F._to = u;
					F._animating = true;
					x.onAnimate(F, {
								to : u,
								listeners : {
									afteranimate : {
										fn : function() {
											this._animating = false
										},
										scope : F
									}
								}
							})
				} else {
					u = x.renderer(F, b.getAt(ae), Ext.apply(u, {
										hidden : false
									}), ae, b);
					F.setAttributes(u, true)
				}
				H += v
			}
		}
		L = D.getCount();
		for (ae = 0; ae < L; ae++) {
			if (!t[(ae / S) >> 0] && D.getAt(ae)) {
				D.getAt(ae).hide(true)
			}
		}
		if (l) {
			al = Z.length;
			for (K = 0; K < L; K++) {
				if (!t[(K / S) >> 0]) {
					for (ad = 0; ad < al; ad++) {
						if (Z[ad].getAt(K)) {
							Z[ad].getAt(K).hide(true)
						}
					}
				}
			}
		}
		x.renderLabels();
		x.renderCallouts()
	},
	onCreateLabel : function(f, k, e, g) {
		var h = this, j = h.labelsGroup, a = h.label, d = h.centerX, c = h.centerY, l = k.middle, b = Ext
				.apply(h.seriesLabelStyle || {}, a || {});
		return h.chart.surface.add(Ext.apply({
					type : "text",
					"text-anchor" : "middle",
					group : j,
					x : l.x,
					y : l.y
				}, b))
	},
	onPlaceLabel : function(j, o, w, s, r, e, f) {
		var A = this, p = A.chart, v = p.resizing, z = A.label, t = z.renderer, c = []
				.concat(z.field), l = A.centerX, k = A.centerY, B = w.middle, b = {
			x : B.x,
			y : B.y
		}, n = B.x - l, m = B.y - k, q = {}, d = 1, h = Math.atan2(m, n || 1), u = h
				* 180 / Math.PI, g;
		function a(i) {
			if (i < 0) {
				i += 360
			}
			return i % 360
		}
		j.setAttributes({
					text : t(o.get(c[f]))
				}, true);
		switch (r) {
			case "outside" :
				d = Math.sqrt(n * n + m * m) * 2;
				b.x = d * Math.cos(h) + l;
				b.y = d * Math.sin(h) + k;
				break;
			case "rotate" :
				u = a(u);
				u = (u > 90 && u < 270) ? u + 180 : u;
				g = j.attr.rotation.degrees;
				if (g != null && Math.abs(g - u) > 180) {
					if (u > g) {
						u -= 360
					} else {
						u += 360
					}
					u = u % 360
				} else {
					u = a(u)
				}
				b.rotate = {
					degrees : u,
					x : b.x,
					y : b.y
				};
				break;
			default :
				break
		}
		b.translate = {
			x : 0,
			y : 0
		};
		if (e && !v && (r != "rotate" || g != null)) {
			A.onAnimate(j, {
						to : b
					})
		} else {
			j.setAttributes(b, true)
		}
		j._from = q
	},
	onPlaceCallout : function(k, n, z, u, t, d, e) {
		var B = this, o = B.chart, v = o.resizing, A = B.callouts, h = B.centerX, g = B.centerY, C = z.middle, b = {
			x : C.x,
			y : C.y
		}, m = C.x - h, j = C.y - g, c = 1, l, f = Math.atan2(j, m || 1), a = k.label
				.getBBox(), w = 20, s = 10, r = 10, q;
		c = z.endRho + w;
		l = (z.endRho + z.startRho) / 2 + (z.endRho - z.startRho) / 3;
		b.x = c * Math.cos(f) + h;
		b.y = c * Math.sin(f) + g;
		m = l * Math.cos(f);
		j = l * Math.sin(f);
		if (o.animate) {
			B.onAnimate(k.lines, {
						to : {
							path : ["M", m + h, j + g, "L", b.x, b.y, "Z", "M",
									b.x, b.y, "l", m > 0 ? s : -s, 0, "z"]
						}
					});
			B.onAnimate(k.box, {
						to : {
							x : b.x + (m > 0 ? s : -(s + a.width + 2 * r)),
							y : b.y
									+ (j > 0
											? (-a.height - r / 2)
											: (-a.height - r / 2)),
							width : a.width + 2 * r,
							height : a.height + 2 * r
						}
					});
			B.onAnimate(k.label, {
						to : {
							x : b.x + (m > 0 ? (s + r) : -(s + a.width + r)),
							y : b.y + (j > 0 ? -a.height / 4 : -a.height / 4)
						}
					})
		} else {
			k.lines.setAttributes({
						path : ["M", m + h, j + g, "L", b.x, b.y, "Z", "M",
								b.x, b.y, "l", m > 0 ? s : -s, 0, "z"]
					}, true);
			k.box.setAttributes({
						x : b.x + (m > 0 ? s : -(s + a.width + 2 * r)),
						y : b.y
								+ (j > 0 ? (-a.height - r / 2) : (-a.height - r
										/ 2)),
						width : a.width + 2 * r,
						height : a.height + 2 * r
					}, true);
			k.label.setAttributes({
						x : b.x + (m > 0 ? (s + r) : -(s + a.width + r)),
						y : b.y + (j > 0 ? -a.height / 4 : -a.height / 4)
					}, true)
		}
		for (q in k) {
			k[q].show(true)
		}
	},
	onAnimate : function(b, a) {
		b.show();
		return this.callParent(arguments)
	},
	isItemInPoint : function(k, h, m, e) {
		var g = this, d = g.centerX, c = g.centerY, o = Math.abs, n = o(k - d), l = o(h
				- c), f = m.startAngle, a = m.endAngle, j = Math.sqrt(n * n + l
				* l), b = Math.atan2(h - c, k - d) / g.rad + 360;
		if (b > g.firstAngle) {
			b -= 360
		}
		return (b <= f && b > a && j >= m.startRho && j <= m.endRho)
	},
	hideAll : function() {
		var e, b, g, f, d, a, c;
		if (!isNaN(this._index)) {
			this.__excludes = this.__excludes || [];
			this.__excludes[this._index] = true;
			c = this.slices[this._index].sprite;
			for (d = 0, a = c.length; d < a; d++) {
				c[d].setAttributes({
							hidden : true
						}, true)
			}
			if (this.slices[this._index].shadowAttrs) {
				for (e = 0, f = this.slices[this._index].shadowAttrs, b = f.length; e < b; e++) {
					g = f[e];
					for (d = 0, a = g.length; d < a; d++) {
						g[d].setAttributes({
									hidden : true
								}, true)
					}
				}
			}
			this.drawSeries()
		}
	},
	showAll : function() {
		if (!isNaN(this._index)) {
			this.__excludes[this._index] = false;
			this.drawSeries()
		}
	},
	highlightItem : function(q) {
		var t = this, s = t.rad;
		q = q || this.items[this._index];
		this.unHighlightItem();
		if (!q || q.sprite && q.sprite._animating) {
			return
		}
		t.callParent([q]);
		if (!t.highlight) {
			return
		}
		if ("segment" in t.highlightCfg) {
			var v = t.highlightCfg.segment, d = t.chart.animate, n, p, a, e, j, b, l, c;
			if (t.labelsGroup) {
				var f = t.labelsGroup, o = t.label.display, g = f
						.getAt(q.index), u = (q.startAngle + q.endAngle) / 2
						* s, m = v.margin || 0, k = m * Math.cos(u), h = m
						* Math.sin(u);
				if (Math.abs(k) < 1e-10) {
					k = 0
				}
				if (Math.abs(h) < 1e-10) {
					h = 0
				}
				if (d) {
					g.stopAnimation();
					g.animate({
								to : {
									translate : {
										x : k,
										y : h
									}
								},
								duration : t.highlightDuration
							})
				} else {
					g.setAttributes({
								translate : {
									x : k,
									y : h
								}
							}, true)
				}
			}
			if (t.chart.shadow && q.shadows) {
				p = 0;
				a = q.shadows;
				j = a.length;
				for (; p < j; p++) {
					e = a[p];
					b = {};
					l = q.sprite._from.segment;
					for (c in l) {
						if (!(c in v)) {
							b[c] = l[c]
						}
					}
					n = {
						segment : Ext.applyIf(b, t.highlightCfg.segment)
					};
					if (d) {
						e.stopAnimation();
						e.animate({
									to : n,
									duration : t.highlightDuration
								})
					} else {
						e.setAttributes(n, true)
					}
				}
			}
		}
	},
	unHighlightItem : function() {
		var v = this;
		if (!v.highlight) {
			return
		}
		if (("segment" in v.highlightCfg) && v.items) {
			var k = v.items, e = v.chart.animate, d = !!v.chart.shadow, h = v.labelsGroup, s = k.length, r = 0, q = 0, o = v.label.display, w, l, c, a, u, m, b, f, t, g, n;
			for (; r < s; r++) {
				t = k[r];
				if (!t) {
					continue
				}
				m = t.sprite;
				if (m && m._highlighted) {
					if (h) {
						g = h.getAt(t.index);
						n = Ext.apply({
									translate : {
										x : 0,
										y : 0
									}
								}, o == "rotate" ? {
									rotate : {
										x : g.attr.x,
										y : g.attr.y,
										degrees : g.attr.rotation.degrees
									}
								} : {});
						if (e) {
							g.stopAnimation();
							g.animate({
										to : n,
										duration : v.highlightDuration
									})
						} else {
							g.setAttributes(n, true)
						}
					}
					if (d) {
						b = t.shadows;
						w = b.length;
						for (; q < w; q++) {
							c = {};
							a = t.sprite._to.segment;
							u = t.sprite._from.segment;
							Ext.apply(c, u);
							for (l in a) {
								if (!(l in u)) {
									c[l] = a[l]
								}
							}
							f = b[q];
							if (e) {
								f.stopAnimation();
								f.animate({
											to : {
												segment : c
											},
											duration : v.highlightDuration
										})
							} else {
								f.setAttributes({
											segment : c
										}, true)
							}
						}
					}
				}
			}
		}
		v.callParent(arguments)
	},
	getLegendColor : function(a) {
		var b = this;
		return b.colorArrayStyle[a % b.colorArrayStyle.length]
	}
});
Ext.define("Ext.chart.series.Radar", {
	extend : "Ext.chart.series.Series",
	requires : ["Ext.chart.Shape", "Ext.fx.Anim"],
	type : "radar",
	alias : "series.radar",
	rad : Math.PI / 180,
	showInLegend : false,
	style : {},
	constructor : function(c) {
		this.callParent(arguments);
		var e = this, a = e.chart.surface, d, b;
		e.group = a.getGroup(e.seriesId);
		if (e.showMarkers) {
			e.markerGroup = a.getGroup(e.seriesId + "-markers")
		}
	},
	drawSeries : function() {
		var K = this, m = K.chart.substore || K.chart.store, o = K.group, B, v = K.chart, k = v.animate, c = K.field
				|| K.yField, D = v.surface, t = v.chartBBox, g, q, p, w, h, I = 0, C = [], G = Math.max, e = Math.cos, a = Math.sin, A = Math.PI
				* 2, E = m.getCount(), J, z, s, r, d, F, b, j = K.seriesStyle, H = K.seriesLabelStyle, n = v.resizing
				|| !K.radar, f = v.axes && v.axes.get(0), u = !(f && f.maximum);
		K.setBBox();
		I = u ? 0 : (f.maximum || 0);
		Ext.apply(j, K.style || {});
		if (!m || !m.getCount()) {
			return
		}
		K.unHighlightItem();
		K.cleanHighlights();
		q = K.centerX = t.x + (t.width / 2);
		p = K.centerY = t.y + (t.height / 2);
		K.radius = h = Math.min(t.width, t.height) / 2;
		K.items = w = [];
		if (u) {
			v.series.each(function(i) {
						C.push(i.yField)
					});
			m.each(function(l, x) {
						for (x = 0, b = C.length; x < b; x++) {
							I = G(+l.get(C[x]), I)
						}
					})
		}
		I = I || 1;
		J = [];
		z = [];
		m.each(function(l, x) {
					d = h * l.get(c) / I;
					s = d * e(x / E * A);
					r = d * a(x / E * A);
					if (x == 0) {
						z.push("M", s + q, r + p);
						J.push("M", 0.01 * s + q, 0.01 * r + p)
					} else {
						z.push("L", s + q, r + p);
						J.push("L", 0.01 * s + q, 0.01 * r + p)
					}
					w.push({
								sprite : false,
								point : [q + s, p + r],
								series : K
							})
				});
		z.push("Z");
		if (!K.radar) {
			K.radar = D.add(Ext.apply({
						type : "path",
						group : o,
						path : J
					}, j || {}))
		}
		if (v.resizing) {
			K.radar.setAttributes({
						path : J
					}, true)
		}
		if (v.animate) {
			K.onAnimate(K.radar, {
						to : Ext.apply({
									path : z
								}, j || {})
					})
		} else {
			K.radar.setAttributes(Ext.apply({
								path : z
							}, j || {}), true)
		}
		if (K.showMarkers) {
			K.drawMarkers()
		}
		K.renderLabels();
		K.renderCallouts()
	},
	drawMarkers : function() {
		var m = this, j = m.chart, a = j.surface, b = Ext.apply({},
				m.markerStyle || {}), h = Ext.apply(b, m.markerConfig), k = m.items, n = h.type, p = m.markerGroup, e = m.centerX, d = m.centerY, o, g, c, f;
		delete h.type;
		for (g = 0, c = k.length; g < c; g++) {
			o = k[g];
			f = p.getAt(g);
			if (!f) {
				f = Ext.chart.Shape[n](a, Ext.apply({
									group : p,
									x : 0,
									y : 0,
									translate : {
										x : e,
										y : d
									}
								}, h))
			} else {
				f.show()
			}
			if (j.resizing) {
				f.setAttributes({
							x : 0,
							y : 0,
							translate : {
								x : e,
								y : d
							}
						}, true)
			}
			f._to = {
				translate : {
					x : o.point[0],
					y : o.point[1]
				}
			};
			if (j.animate) {
				m.onAnimate(f, {
							to : f._to
						})
			} else {
				f.setAttributes(Ext.apply(f._to, h || {}), true)
			}
		}
	},
	isItemInPoint : function(c, f, e) {
		var b, d = 10, a = Math.abs;
		b = e.point;
		return (a(b[0] - c) <= d && a(b[1] - f) <= d)
	},
	onCreateLabel : function(f, l, e, g) {
		var h = this, k = h.labelsGroup, a = h.label, d = h.centerX, c = h.centerY, j = l.point, b = Ext
				.apply(h.seriesLabelStyle || {}, a);
		return h.chart.surface.add(Ext.apply({
					type : "text",
					"text-anchor" : "middle",
					group : k,
					x : d,
					y : c
				}, a || {}))
	},
	onPlaceLabel : function(p, g, r, f, j, b) {
		var l = this, k = l.chart, h = k.resizing, c = l.label, q = c.renderer, o = c.field, e = l.centerX, d = l.centerY, a = {
			x : r.point[0],
			y : r.point[1]
		}, n = a.x - e, m = a.y - d;
		p.setAttributes({
					text : q(g.get(o)),
					hidden : true
				}, true);
		if (h) {
			p.setAttributes({
						x : e,
						y : d
					}, true)
		}
		if (b) {
			p.show(true);
			l.onAnimate(p, {
						to : a
					})
		} else {
			p.setAttributes(a, true);
			p.show(true)
		}
	},
	toggleAll : function(a) {
		var e = this, b, d, f, c;
		if (!a) {
			Ext.chart.series.Radar.superclass.hideAll.call(e)
		} else {
			Ext.chart.series.Radar.superclass.showAll.call(e)
		}
		if (e.radar) {
			e.radar.setAttributes({
						hidden : !a
					}, true);
			if (e.radar.shadows) {
				for (b = 0, c = e.radar.shadows, d = c.length; b < d; b++) {
					f = c[b];
					f.setAttributes({
								hidden : !a
							}, true)
				}
			}
		}
	},
	hideAll : function() {
		this.toggleAll(false);
		this.hideMarkers(0)
	},
	showAll : function() {
		this.toggleAll(true)
	},
	hideMarkers : function(a) {
		var d = this, c = d.markerGroup && d.markerGroup.getCount() || 0, b = a
				|| 0;
		for (; b < c; b++) {
			d.markerGroup.getAt(b).hide(true)
		}
	}
});
Ext.define("Ext.chart.series.Scatter", {
	extend : "Ext.chart.series.Cartesian",
	requires : ["Ext.chart.axis.Axis", "Ext.chart.Shape", "Ext.fx.Anim"],
	type : "scatter",
	alias : "series.scatter",
	constructor : function(c) {
		this.callParent(arguments);
		var e = this, f = e.chart.shadow, a = e.chart.surface, d, b;
		Ext.apply(e, c, {
					style : {},
					markerConfig : {},
					shadowAttributes : [{
								"stroke-width" : 6,
								"stroke-opacity" : 0.05,
								stroke : "rgb(0, 0, 0)"
							}, {
								"stroke-width" : 4,
								"stroke-opacity" : 0.1,
								stroke : "rgb(0, 0, 0)"
							}, {
								"stroke-width" : 2,
								"stroke-opacity" : 0.15,
								stroke : "rgb(0, 0, 0)"
							}]
				});
		e.group = a.getGroup(e.seriesId);
		if (f) {
			for (d = 0, b = e.shadowAttributes.length; d < b; d++) {
				e.shadowGroups.push(a.getGroup(e.seriesId + "-shadows" + d))
			}
		}
	},
	getBounds : function() {
		var l = this, k = l.chart, n = k.substore || k.store, h = []
				.concat(l.axis), p, o, c, j, f, e, b, a, g, d, m;
		l.setBBox();
		p = l.bbox;
		for (g = 0, j = h.length; g < j; g++) {
			d = k.axes.get(h[g]);
			if (d) {
				m = d.calcEnds();
				if (d.position == "top" || d.position == "bottom") {
					f = m.from;
					b = m.to
				} else {
					e = m.from;
					a = m.to
				}
			}
		}
		if (l.xField && !Ext.isNumber(f)) {
			d = Ext.create("Ext.chart.axis.Axis", {
						chart : k,
						fields : [].concat(l.xField)
					}).calcEnds();
			f = d.from;
			b = d.to
		}
		if (l.yField && !Ext.isNumber(e)) {
			d = Ext.create("Ext.chart.axis.Axis", {
						chart : k,
						fields : [].concat(l.yField)
					}).calcEnds();
			e = d.from;
			a = d.to
		}
		if (isNaN(f)) {
			f = 0;
			b = n.getCount() - 1;
			o = p.width / (n.getCount() - 1)
		} else {
			o = p.width / (b - f)
		}
		if (isNaN(e)) {
			e = 0;
			a = n.getCount() - 1;
			c = p.height / (n.getCount() - 1)
		} else {
			c = p.height / (a - e)
		}
		return {
			bbox : p,
			minX : f,
			minY : e,
			xScale : o,
			yScale : c
		}
	},
	getPaths : function() {
		var s = this, j = s.chart, b = j.shadow, d = j.substore || j.store, g = s.group, e = s.bounds = s
				.getBounds(), a = s.bbox, u = e.xScale, c = e.yScale, q = e.minX, p = e.minY, t = a.x, r = a.y, f = a.height, k = s.items = [], m = [], i, h, n, o, l;
		d.each(function(v, w) {
					n = v.get(s.xField);
					o = v.get(s.yField);
					if (typeof o == "undefined" || (typeof o == "string" && !o)) {
						return
					}
					if (typeof n == "string" || typeof n == "object") {
						n = w
					}
					if (typeof o == "string" || typeof o == "object") {
						o = w
					}
					i = t + (n - q) * u;
					h = r + f - (o - p) * c;
					m.push({
								x : i,
								y : h
							});
					s.items.push({
								series : s,
								value : [n, o],
								point : [i, h],
								storeItem : v
							});
					if (j.animate && j.resizing) {
						l = g.getAt(w);
						if (l) {
							s.resetPoint(l);
							if (b) {
								s.resetShadow(l)
							}
						}
					}
				});
		return m
	},
	resetPoint : function(a) {
		var b = this.bbox;
		a.setAttributes({
					translate : {
						x : (b.x + b.width) / 2,
						y : (b.y + b.height) / 2
					}
				}, true)
	},
	resetShadow : function(c) {
		var f = this, e = c.shadows, h = f.shadowAttributes, d = f.shadowGroups.length, g = f.bbox, b, a;
		for (b = 0; b < d; b++) {
			a = Ext.apply({}, h[b]);
			if (a.translate) {
				a.translate.x += (g.x + g.width) / 2;
				a.translate.y += (g.y + g.height) / 2
			} else {
				a.translate = {
					x : (g.x + g.width) / 2,
					y : (g.y + g.height) / 2
				}
			}
			e[b].setAttributes(a, true)
		}
	},
	createPoint : function(a, c) {
		var d = this, b = d.chart, e = d.group, f = d.bbox;
		return Ext.chart.Shape[c](b.surface, Ext.apply({}, {
							x : 0,
							y : 0,
							group : e,
							translate : {
								x : (f.x + f.width) / 2,
								y : (f.y + f.height) / 2
							}
						}, a))
	},
	createShadow : function(m, f, j) {
		var h = this, g = h.chart, k = h.shadowGroups, d = h.shadowAttributes, a = k.length, n = h.bbox, c, l, b, e;
		m.shadows = b = [];
		for (c = 0; c < a; c++) {
			e = Ext.apply({}, d[c]);
			if (e.translate) {
				e.translate.x += (n.x + n.width) / 2;
				e.translate.y += (n.y + n.height) / 2
			} else {
				Ext.apply(e, {
							translate : {
								x : (n.x + n.width) / 2,
								y : (n.y + n.height) / 2
							}
						})
			}
			Ext.apply(e, f);
			l = Ext.chart.Shape[j](g.surface, Ext.apply({}, {
								x : 0,
								y : 0,
								group : k[c]
							}, e));
			b.push(l)
		}
	},
	drawSeries : function() {
		var t = this, k = t.chart, g = k.substore || k.store, h = t.group, c = k.shadow, a = t.shadowGroups, p = t.shadowAttributes, q = a.length, l, m, n, j, o, s, e, f, b, d, r;
		s = Ext.apply(t.markerStyle, t.markerConfig);
		f = s.type;
		delete s.type;
		if (!g || !g.getCount()) {
			return
		}
		t.unHighlightItem();
		t.cleanHighlights();
		m = t.getPaths();
		j = m.length;
		for (o = 0; o < j; o++) {
			n = m[o];
			l = h.getAt(o);
			Ext.apply(n, s);
			if (!l) {
				l = t.createPoint(n, f);
				if (c) {
					t.createShadow(l, s, f)
				}
			}
			b = l.shadows;
			if (k.animate) {
				d = t.renderer(l, g.getAt(o), {
							translate : n
						}, o, g);
				l._to = d;
				t.onAnimate(l, {
							to : d
						});
				for (e = 0; e < q; e++) {
					r = Ext.apply({}, p[e]);
					d = t.renderer(b[e], g.getAt(o), Ext.apply({}, {
								translate : {
									x : n.x + (r.translate ? r.translate.x : 0),
									y : n.y + (r.translate ? r.translate.y : 0)
								}
							}, r), o, g);
					t.onAnimate(b[e], {
								to : d
							})
				}
			} else {
				d = t.renderer(l, g.getAt(o), Ext.apply({
									translate : n
								}, {
									hidden : false
								}), o, g);
				l.setAttributes(d, true);
				for (e = 0; e < q; e++) {
					r = p[e];
					d = t.renderer(b[e], g.getAt(o), Ext.apply({
										x : n.x,
										y : n.y
									}, r), o, g);
					b[e].setAttributes(d, true)
				}
			}
			t.items[o].sprite = l
		}
		j = h.getCount();
		for (o = m.length; o < j; o++) {
			h.getAt(o).hide(true)
		}
		t.renderLabels();
		t.renderCallouts()
	},
	onCreateLabel : function(d, j, c, e) {
		var f = this, g = f.labelsGroup, a = f.label, b = Ext.apply({}, a,
				f.seriesLabelStyle), h = f.bbox;
		return f.chart.surface.add(Ext.apply({
					type : "text",
					group : g,
					x : j.point[0],
					y : h.y + h.height / 2
				}, b))
	},
	onPlaceLabel : function(f, j, s, p, o, d) {
		var u = this, k = u.chart, r = k.resizing, t = u.label, q = t.renderer, b = t.field, a = u.bbox, h = s.point[0], g = s.point[1], c = s.sprite.attr.radius, e, m, l, n;
		f.setAttributes({
					text : q(j.get(b)),
					hidden : true
				}, true);
		if (o == "rotate") {
			f.setAttributes({
						"text-anchor" : "start",
						rotation : {
							x : h,
							y : g,
							degrees : -45
						}
					}, true);
			e = f.getBBox();
			m = e.width;
			l = e.height;
			h = h < a.x ? a.x : h;
			h = (h + m > a.x + a.width) ? (h - (h + m - a.x - a.width)) : h;
			g = (g - l < a.y) ? a.y + l : g
		} else {
			if (o == "under" || o == "over") {
				e = s.sprite.getBBox();
				e.width = e.width || (c * 2);
				e.height = e.height || (c * 2);
				g = g + (o == "over" ? -e.height : e.height);
				e = f.getBBox();
				m = e.width / 2;
				l = e.height / 2;
				h = h - m < a.x ? a.x + m : h;
				h = (h + m > a.x + a.width) ? (h - (h + m - a.x - a.width)) : h;
				g = g - l < a.y ? a.y + l : g;
				g = (g + l > a.y + a.height)
						? (g - (g + l - a.y - a.height))
						: g
			}
		}
		if (!k.animate) {
			f.setAttributes({
						x : h,
						y : g
					}, true);
			f.show(true)
		} else {
			if (r) {
				n = s.sprite.getActiveAnimation();
				if (n) {
					n.on("afteranimate", function() {
								f.setAttributes({
											x : h,
											y : g
										}, true);
								f.show(true)
							})
				} else {
					f.show(true)
				}
			} else {
				u.onAnimate(f, {
							to : {
								x : h,
								y : g
							}
						})
			}
		}
	},
	onPlaceCallout : function(j, l, A, w, v, c, g) {
		var D = this, m = D.chart, t = m.surface, z = m.resizing, C = D.callouts, n = D.items, b = A.point, E, a = j.label
				.getBBox(), B = 30, s = 10, r = 3, e, d, f, q, o, u = D.bbox, k, h;
		E = [Math.cos(Math.PI / 4), -Math.sin(Math.PI / 4)];
		k = b[0] + E[0] * B;
		h = b[1] + E[1] * B;
		e = k + (E[0] > 0 ? 0 : -(a.width + 2 * r));
		d = h - a.height / 2 - r;
		f = a.width + 2 * r;
		q = a.height + 2 * r;
		if (e < u[0] || (e + f) > (u[0] + u[2])) {
			E[0] *= -1
		}
		if (d < u[1] || (d + q) > (u[1] + u[3])) {
			E[1] *= -1
		}
		k = b[0] + E[0] * B;
		h = b[1] + E[1] * B;
		e = k + (E[0] > 0 ? 0 : -(a.width + 2 * r));
		d = h - a.height / 2 - r;
		f = a.width + 2 * r;
		q = a.height + 2 * r;
		if (m.animate) {
			D.onAnimate(j.lines, {
						to : {
							path : ["M", b[0], b[1], "L", k, h, "Z"]
						}
					}, true);
			D.onAnimate(j.box, {
						to : {
							x : e,
							y : d,
							width : f,
							height : q
						}
					}, true);
			D.onAnimate(j.label, {
						to : {
							x : k + (E[0] > 0 ? r : -(a.width + r)),
							y : h
						}
					}, true)
		} else {
			j.lines.setAttributes({
						path : ["M", b[0], b[1], "L", k, h, "Z"]
					}, true);
			j.box.setAttributes({
						x : e,
						y : d,
						width : f,
						height : q
					}, true);
			j.label.setAttributes({
						x : k + (E[0] > 0 ? r : -(a.width + r)),
						y : h
					}, true)
		}
		for (o in j) {
			j[o].show(true)
		}
	},
	onAnimate : function(b, a) {
		b.show();
		return this.callParent(arguments)
	},
	isItemInPoint : function(c, g, e) {
		var b, d = 10, a = Math.abs;
		function f(h) {
			var j = a(h[0] - c), i = a(h[1] - g);
			return Math.sqrt(j * j + i * i)
		}
		b = e.point;
		return (b[0] - d <= c && b[0] + d >= c && b[1] - d <= g && b[1] + d >= g)
	}
});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.SystemStatus", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.chart.*"],
	id : "systemstatus",
	init : function() {
		Ext.chart.theme.Memory = Ext.extend(Ext.chart.theme.Base, {
			constructor : function(a) {
				Ext.chart.theme.Memory.superclass.constructor.call(this, Ext
						.apply({
									colors : ["rgb(244, 16, 0)",
											"rgb(248, 130, 1)",
											"rgb(0, 7, 255)", "rgb(84, 254, 0)"]
								}, a))
			}
		})
	},
	createNewWindow : function() {
		var a = this, b = a.app.getDesktop();
		a.cpuLoadData = [];
		a.cpuLoadStore = Ext.create("store.json", {
					fields : ["core1", "core2"]
				});
		a.memoryArray = ["Wired", "Active", "Inactive", "Free"];
		a.memoryStore = Ext.create("store.json", {
					fields : ["name", "memory"],
					data : a.generateData(a.memoryArray)
				});
		a.pass = 0;
		a.processArray = ["explorer", "monitor", "charts", "desktop", "Ext3",
				"Ext4"];
		a.processesMemoryStore = Ext.create("store.json", {
					fields : ["name", "memory"],
					data : a.generateData(a.processArray)
				});
		a.generateCpuLoad();
		return b.createWindow({
					id : "systemstatus",
					title : "System Status",
					width : 800,
					height : 600,
					animCollapse : false,
					constrainHeader : true,
					border : false,
					layout : "fit",
					listeners : {
						afterrender : {
							fn : a.updateCharts,
							delay : 100
						},
						destroy : function() {
							clearTimeout(a.updateTimer);
							a.updateTimer = null
						},
						scope : a
					},
					items : [{
						xtype : "panel",
						layout : {
							type : "hbox",
							align : "stretch"
						},
						items : [{
							flex : 1,
							height : 600,
							width : 400,
							xtype : "container",
							layout : {
								type : "vbox",
								align : "stretch"
							},
							items : [a.createCpu1LoadChart(),
									a.createCpu2LoadChart()]
						}, {
							flex : 1,
							width : 400,
							height : 600,
							xtype : "container",
							layout : {
								type : "vbox",
								align : "stretch"
							},
							items : [a.createMemoryPieChart(),
									a.createProcessChart()]
						}]
					}]
				})
	},
	createWindow : function() {
		var a = this.app.getDesktop().getWindow(this.id);
		if (!a) {
			a = this.createNewWindow()
		}
		a.show();
		return a
	},
	createCpu1LoadChart : function() {
		return {
			flex : 1,
			xtype : "chart",
			theme : "Category1",
			animate : false,
			store : this.cpuLoadStore,
			legend : {
				position : "bottom"
			},
			axes : [{
						type : "Numeric",
						position : "left",
						minimum : 0,
						maximum : 100,
						fields : ["core1"],
						title : "CPU Load",
						grid : true,
						labelTitle : {
							font : "13px Arial"
						},
						label : {
							font : "11px Arial"
						}
					}],
			series : [{
						title : "Core 1 (3.4GHz)",
						type : "line",
						lineWidth : 4,
						showMarkers : false,
						fill : true,
						axis : "right",
						xField : "time",
						yField : "core1",
						style : {
							"stroke-width" : 1
						}
					}]
		}
	},
	createCpu2LoadChart : function() {
		return {
			flex : 1,
			xtype : "chart",
			theme : "Category2",
			animate : false,
			store : this.cpuLoadStore,
			legend : {
				position : "bottom"
			},
			axes : [{
						type : "Numeric",
						position : "left",
						minimum : 0,
						maximum : 100,
						grid : true,
						fields : ["core2"],
						title : "CPU Load",
						labelTitle : {
							font : "13px Arial"
						},
						label : {
							font : "11px Arial"
						}
					}],
			series : [{
						title : "Core 2 (3.4GHz)",
						type : "line",
						lineWidth : 4,
						showMarkers : false,
						fill : true,
						axis : "right",
						xField : "time",
						yField : "core2",
						style : {
							"stroke-width" : 1
						}
					}]
		}
	},
	createMemoryPieChart : function() {
		var a = this;
		return {
			flex : 1,
			xtype : "chart",
			animate : {
				duration : 250
			},
			store : this.memoryStore,
			shadow : true,
			legend : {
				position : "right"
			},
			insetPadding : 40,
			theme : "Memory:gradients",
			series : [{
				donut : 30,
				type : "pie",
				field : "memory",
				showInLegend : true,
				tips : {
					trackMouse : true,
					width : 140,
					height : 28,
					renderer : function(d, c) {
						var b = 0;
						a.memoryStore.each(function(e) {
									b += e.get("memory")
								});
						this.setTitle(d.get("name") + ": "
								+ Math.round(d.get("memory") / b * 100) + "%")
					}
				},
				highlight : {
					segment : {
						margin : 20
					}
				},
				labelTitle : {
					font : "13px Arial"
				},
				label : {
					field : "name",
					display : "rotate",
					contrast : true,
					font : "12px Arial"
				}
			}]
		}
	},
	createProcessChart : function() {
		return {
			flex : 1,
			xtype : "chart",
			theme : "Category1",
			store : this.processesMemoryStore,
			animate : {
				easing : "ease-in-out",
				duration : 750
			},
			axes : [{
						type : "Numeric",
						position : "left",
						minimum : 0,
						maximum : 10,
						fields : ["memory"],
						title : "Memory",
						labelTitle : {
							font : "13px Arial"
						},
						label : {
							font : "11px Arial"
						}
					}, {
						type : "Category",
						position : "bottom",
						fields : ["name"],
						title : "System Processes",
						labelTitle : {
							font : "bold 14px Arial"
						},
						label : {
							rotation : {
								degrees : 45
							}
						}
					}, {
						type : "Numeric",
						position : "top",
						fields : ["memory"],
						title : "Memory Usage",
						labelTitle : {
							font : "bold 14px Arial"
						},
						label : {
							fill : "#FFFFFF",
							stroke : "#FFFFFF"
						},
						axisStyle : {
							fill : "#FFFFFF",
							stroke : "#FFFFFF"
						}
					}],
			series : [{
				title : "Processes",
				type : "column",
				xField : "name",
				yField : "memory",
				renderer : function(g, c, b, f, e) {
					var a = Ext.draw.Color.fromString("#b1da5a"), h = c
							.get("memory"), d;
					if (h > 5) {
						d = a.getDarker((h - 5) / 15).toString()
					} else {
						d = a.getLighter(((5 - h) / 20)).toString()
					}
					if (h >= 8) {
						d = "#CD0000"
					}
					return Ext.apply(b, {
								fill : d
							})
				}
			}]
		}
	},
	generateCpuLoad : function() {
		var c = this, e = c.cpuLoadData;
		function a(f) {
			var g = f + ((Math.floor(Math.random() * 2) % 2) ? -1 : 1)
					* Math.floor(Math.random() * 9);
			if (g < 0 || g > 100) {
				g = 50
			}
			return g
		}
		if (e.length === 0) {
			e.push({
						core1 : 0,
						core2 : 0,
						time : 0
					});
			for (var b = 1; b < 100; b++) {
				e.push({
							core1 : a(e[b - 1].core1),
							core2 : a(e[b - 1].core2),
							time : b
						})
			}
			c.cpuLoadStore.loadData(e)
		} else {
			c.cpuLoadStore.data.removeAt(0);
			c.cpuLoadStore.data.each(function(g, f) {
						g.data.time = f
					});
			var d = c.cpuLoadStore.last().data;
			c.cpuLoadStore.loadData([{
								core1 : a(d.core1),
								core2 : a(d.core2),
								time : d.time + 1
							}], true)
		}
	},
	generateData : function(e) {
		var d = [], b, c = e.length, a;
		for (b = 0; b < e.length; b++) {
			a = Math.floor(Math.random() * c * 100) / 100 + 2;
			c = c - (a - 5);
			d.push({
						name : e[b],
						memory : a
					})
		}
		return d
	},
	updateCharts : function() {
		var a = this;
		clearTimeout(a.updateTimer);
		a.updateTimer = setTimeout(function() {
					if (a.pass % 3 === 0) {
						a.memoryStore.loadData(a.generateData(a.memoryArray))
					}
					if (a.pass % 5 === 0) {
						a.processesMemoryStore.loadData(a
								.generateData(a.processArray))
					}
					a.generateCpuLoad();
					a.updateCharts();
					a.pass++
				}, 500)
	}
});
Ext.define("Ext.tip.QuickTip", {
			extend : "Ext.tip.ToolTip",
			alternateClassName : "Ext.QuickTip",
			interceptTitles : false,
			title : "&#160;",
			tagConfig : {
				namespace : "data-",
				attribute : "qtip",
				width : "qwidth",
				target : "target",
				title : "qtitle",
				hide : "hide",
				cls : "qclass",
				align : "qalign",
				anchor : "anchor"
			},
			initComponent : function() {
				var a = this;
				a.target = a.target || Ext.getDoc();
				a.targets = a.targets || {};
				a.callParent()
			},
			register : function(c) {
				var g = Ext.isArray(c) ? c : arguments, d = 0, a = g.length, f, b, e;
				for (; d < a; d++) {
					c = g[d];
					f = c.target;
					if (f) {
						if (Ext.isArray(f)) {
							for (b = 0, e = f.length; b < e; b++) {
								this.targets[Ext.id(f[b])] = c
							}
						} else {
							this.targets[Ext.id(f)] = c
						}
					}
				}
			},
			unregister : function(a) {
				delete this.targets[Ext.id(a)]
			},
			cancelShow : function(a) {
				var b = this, c = b.activeTarget;
				a = Ext.get(a).dom;
				if (b.isVisible()) {
					if (c && c.el == a) {
						b.hide()
					}
				} else {
					if (c && c.el == a) {
						b.clearTimer("show")
					}
				}
			},
			getTipCfg : function(d) {
				var b = d.getTarget(), c, a;
				if (this.interceptTitles && b.title && Ext.isString(b.title)) {
					c = b.title;
					b.qtip = c;
					b.removeAttribute("title");
					d.preventDefault()
				} else {
					a = this.tagConfig;
					b = d.getTarget("[" + a.namespace + a.attribute + "]");
					if (b) {
						c = b.getAttribute(a.namespace + a.attribute)
					}
				}
				return c
			},
			onTargetOver : function(h) {
				var d = this, g = h.getTarget(), i, b, c, f, a;
				if (d.disabled) {
					return
				}
				d.targetXY = h.getXY();
				if (!g || g.nodeType !== 1 || g == document
						|| g == document.body) {
					return
				}
				if (d.activeTarget
						&& ((g == d.activeTarget.el) || Ext
								.fly(d.activeTarget.el).contains(g))) {
					d.clearTimer("hide");
					d.show();
					return
				}
				if (g) {
					Ext.Object.each(d.targets, function(e, j) {
								var k = Ext.fly(j.target);
								if (k && (k.dom === g || k.contains(g))) {
									i = k.dom;
									return false
								}
							});
					if (i) {
						d.activeTarget = d.targets[i.id];
						d.activeTarget.el = g;
						d.anchor = d.activeTarget.anchor;
						if (d.anchor) {
							d.anchorTarget = g
						}
						d.delayShow();
						return
					}
				}
				i = Ext.get(g);
				b = d.tagConfig;
				c = b.namespace;
				f = d.getTipCfg(h);
				if (f) {
					a = i.getAttribute(c + b.hide);
					d.activeTarget = {
						el : g,
						text : f,
						width : +i.getAttribute(c + b.width) || null,
						autoHide : a != "user" && a !== "false",
						title : i.getAttribute(c + b.title),
						cls : i.getAttribute(c + b.cls),
						align : i.getAttribute(c + b.align)
					};
					d.anchor = i.getAttribute(c + b.anchor);
					if (d.anchor) {
						d.anchorTarget = g
					}
					d.delayShow()
				}
			},
			onTargetOut : function(b) {
				var a = this;
				if (a.activeTarget && b.within(a.activeTarget.el)
						&& !a.getTipCfg(b)) {
					return
				}
				a.clearTimer("show");
				if (a.autoHide !== false) {
					a.delayHide()
				}
			},
			showAt : function(c) {
				var a = this, b = a.activeTarget;
				if (b) {
					if (!a.rendered) {
						a.render(Ext.getBody());
						a.activeTarget = b
					}
					if (b.title) {
						a.setTitle(b.title || "");
						a.header.show()
					} else {
						a.header.hide()
					}
					a.body.update(b.text);
					a.autoHide = b.autoHide;
					a.dismissDelay = b.dismissDelay || a.dismissDelay;
					if (a.lastCls) {
						a.el.removeCls(a.lastCls);
						delete a.lastCls
					}
					if (b.cls) {
						a.el.addCls(b.cls);
						a.lastCls = b.cls
					}
					a.setWidth(b.width);
					if (a.anchor) {
						a.constrainPosition = false
					} else {
						if (b.align) {
							c = a.el.getAlignToXY(b.el, b.align);
							a.constrainPosition = false
						} else {
							a.constrainPosition = true
						}
					}
				}
				a.callParent([c])
			},
			hide : function() {
				delete this.activeTarget;
				this.callParent()
			}
		});
Ext.define("Ext.tip.QuickTipManager", function() {
			var b, a = false;
			return {
				requires : ["Ext.tip.QuickTip"],
				singleton : true,
				alternateClassName : "Ext.QuickTips",
				init : function(c) {
					if (!b) {
						if (!Ext.isReady) {
							Ext.onReady(function() {
										Ext.tip.QuickTipManager.init(c)
									});
							return
						}
						b = Ext.create("Ext.tip.QuickTip", {
									disabled : a,
									renderTo : c !== false
											? document.body
											: undefined
								})
					}
				},
				destroy : function() {
					if (b) {
						var c;
						b.destroy();
						b = c
					}
				},
				ddDisable : function() {
					if (b && !a) {
						b.disable()
					}
				},
				ddEnable : function() {
					if (b && !a) {
						b.enable()
					}
				},
				enable : function() {
					if (b) {
						b.enable()
					}
					a = false
				},
				disable : function() {
					if (b) {
						b.disable()
					}
					a = true
				},
				isEnabled : function() {
					return b !== undefined && !b.disabled
				},
				getQuickTip : function() {
					return b
				},
				register : function() {
					b.register.apply(b, arguments)
				},
				unregister : function() {
					b.unregister.apply(b, arguments)
				},
				tips : function() {
					b.register.apply(b, arguments)
				}
			}
		}());
Ext.define("Ext.form.field.HtmlEditor", {
	extend : "Ext.Component",
	mixins : {
		labelable : "Ext.form.Labelable",
		field : "Ext.form.field.Field"
	},
	alias : "widget.htmleditor",
	alternateClassName : "Ext.form.HtmlEditor",
	requires : ["Ext.tip.QuickTipManager", "Ext.picker.Color",
			"Ext.toolbar.Item", "Ext.toolbar.Toolbar", "Ext.util.Format",
			"Ext.layout.component.field.HtmlEditor"],
	fieldSubTpl : [
			'<div class="{toolbarWrapCls}"></div>',
			'<textarea id="{id}" name="{name}" tabIndex="-1" class="{textareaCls}" ',
			'style="{size}" autocomplete="off"></textarea>',
			'<iframe name="{iframeName}" frameBorder="0" style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',
			{
				compiled : true,
				disableFormats : true
			}],
	enableFormat : true,
	enableFontSize : true,
	enableColors : true,
	enableAlignments : true,
	enableLists : true,
	enableSourceEdit : true,
	enableLinks : true,
	enableFont : true,
	createLinkText : "Please enter the URL for the link:",
	defaultLinkValue : "http://",
	fontFamilies : ["Arial", "Courier New", "Tahoma", "Times New Roman",
			"Verdana"],
	defaultFont : "tahoma",
	defaultValue : (Ext.isOpera || Ext.isIE6) ? "&#160;" : "&#8203;",
	fieldBodyCls : Ext.baseCSSPrefix + "html-editor-wrap",
	componentLayout : "htmleditor",
	initialized : false,
	activated : false,
	sourceEditMode : false,
	iframePad : 3,
	hideMode : "offsets",
	maskOnDisable : true,
	initComponent : function() {
		var a = this;
		a.addEvents("initialize", "activate", "beforesync", "beforepush",
				"sync", "push", "editmodechange");
		a.callParent(arguments);
		a.initLabelable();
		a.initField()
	},
	createToolbar : function(e) {
		var g = this, f = [], i = Ext.tip.QuickTipManager
				&& Ext.tip.QuickTipManager.isEnabled(), d = Ext.baseCSSPrefix, c, h, b;
		function a(l, j, k) {
			return {
				itemId : l,
				cls : d + "btn-icon",
				iconCls : d + "edit-" + l,
				enableToggle : j !== false,
				scope : e,
				handler : k || e.relayBtnCmd,
				clickEvent : "mousedown",
				tooltip : i ? e.buttonTips[l] || b : b,
				overflowText : e.buttonTips[l].title || b,
				tabIndex : -1
			}
		}
		if (g.enableFont && !Ext.isSafari2) {
			c = Ext.widget("component", {
				renderTpl : [
						'<select class="{cls}">',
						'<tpl for="fonts">',
						'<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',
						"</tpl>", "</select>"],
				renderData : {
					cls : d + "font-select",
					fonts : g.fontFamilies,
					defaultFont : g.defaultFont
				},
				renderSelectors : {
					selectEl : "select"
				},
				onDisable : function() {
					var j = this.selectEl;
					if (j) {
						j.dom.disabled = true
					}
					Ext.Component.superclass.onDisable.apply(this, arguments)
				},
				onEnable : function() {
					var j = this.selectEl;
					if (j) {
						j.dom.disabled = false
					}
					Ext.Component.superclass.onEnable.apply(this, arguments)
				}
			});
			f.push(c, "-")
		}
		if (g.enableFormat) {
			f.push(a("bold"), a("italic"), a("underline"))
		}
		if (g.enableFontSize) {
			f.push("-", a("increasefontsize", false, g.adjustFont), a(
							"decreasefontsize", false, g.adjustFont))
		}
		if (g.enableColors) {
			f.push("-", {
						itemId : "forecolor",
						cls : d + "btn-icon",
						iconCls : d + "edit-forecolor",
						overflowText : e.buttonTips.forecolor.title,
						tooltip : i ? e.buttonTips.forecolor || b : b,
						tabIndex : -1,
						menu : Ext.widget("menu", {
									plain : true,
									items : [{
										xtype : "colorpicker",
										allowReselect : true,
										focus : Ext.emptyFn,
										value : "000000",
										plain : true,
										clickEvent : "mousedown",
										handler : function(k, j) {
											g.execCmd("forecolor", Ext.isWebKit
															|| Ext.isIE ? "#"
															+ j : j);
											g.deferFocus();
											this.up("menu").hide()
										}
									}]
								})
					}, {
						itemId : "backcolor",
						cls : d + "btn-icon",
						iconCls : d + "edit-backcolor",
						overflowText : e.buttonTips.backcolor.title,
						tooltip : i ? e.buttonTips.backcolor || b : b,
						tabIndex : -1,
						menu : Ext.widget("menu", {
									plain : true,
									items : [{
										xtype : "colorpicker",
										focus : Ext.emptyFn,
										value : "FFFFFF",
										plain : true,
										allowReselect : true,
										clickEvent : "mousedown",
										handler : function(k, j) {
											if (Ext.isGecko) {
												g.execCmd("useCSS", false);
												g.execCmd("hilitecolor", j);
												g.execCmd("useCSS", true);
												g.deferFocus()
											} else {
												g.execCmd(Ext.isOpera
																? "hilitecolor"
																: "backcolor",
														Ext.isWebKit
																|| Ext.isIE
																? "#" + j
																: j);
												g.deferFocus()
											}
											this.up("menu").hide()
										}
									}]
								})
					})
		}
		if (g.enableAlignments) {
			f
					.push("-", a("justifyleft"), a("justifycenter"),
							a("justifyright"))
		}
		if (!Ext.isSafari2) {
			if (g.enableLinks) {
				f.push("-", a("createlink", false, g.createLink))
			}
			if (g.enableLists) {
				f.push("-", a("insertorderedlist"), a("insertunorderedlist"))
			}
			if (g.enableSourceEdit) {
				f.push("-", a("sourceedit", true, function(j) {
									g.toggleSourceEdit(!g.sourceEditMode)
								}))
			}
		}
		h = Ext.widget("toolbar", {
					renderTo : g.toolbarWrap,
					enableOverflow : true,
					items : f
				});
		if (c) {
			g.fontSelect = c.selectEl;
			g.mon(g.fontSelect, "change", function() {
						g.relayCmd("fontname", g.fontSelect.dom.value);
						g.deferFocus()
					})
		}
		g.mon(h.el, "click", function(j) {
					j.preventDefault()
				});
		g.toolbar = h
	},
	onDisable : function() {
		this.bodyEl.mask();
		this.callParent(arguments)
	},
	onEnable : function() {
		this.bodyEl.unmask();
		this.callParent(arguments)
	},
	setReadOnly : function(e) {
		var d = this, c = d.textareaEl, b = d.iframeEl, a;
		d.readOnly = e;
		if (c) {
			c.dom.readOnly = e
		}
		if (d.initialized) {
			a = d.getEditorBody();
			if (Ext.isIE) {
				b.setDisplayed(false);
				a.contentEditable = !e;
				b.setDisplayed(true)
			} else {
				d.setDesignMode(!e)
			}
			if (a) {
				a.style.cursor = e ? "default" : "text"
			}
			d.disableItems(e)
		}
	},
	getDocMarkup : function() {
		var b = this, a = b.iframeEl.getHeight() - b.iframePad * 2;
		return Ext.String
				.format(
						'<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;cursor:text}</style></head><body></body></html>',
						b.iframePad, a)
	},
	getEditorBody : function() {
		var a = this.getDoc();
		return a.body || a.documentElement
	},
	getDoc : function() {
		return (!Ext.isIE && this.iframeEl.dom.contentDocument)
				|| this.getWin().document
	},
	getWin : function() {
		return Ext.isIE
				? this.iframeEl.dom.contentWindow
				: window.frames[this.iframeEl.dom.name]
	},
	onRender : function() {
		var b = this, a = b.renderSelectors;
		Ext.applyIf(a, b.getLabelableSelectors());
		Ext.applyIf(a, {
					toolbarWrap : "div." + Ext.baseCSSPrefix + "html-editor-tb",
					iframeEl : "iframe",
					textareaEl : "textarea"
				});
		b.callParent(arguments);
		b.textareaEl.dom.value = b.value || "";
		b.monitorTask = Ext.TaskManager.start({
					run : b.checkDesignMode,
					scope : b,
					interval : 100
				});
		b.createToolbar(b);
		b.disableItems(true)
	},
	initRenderTpl : function() {
		var a = this;
		if (!a.hasOwnProperty("renderTpl")) {
			a.renderTpl = a.getTpl("labelableRenderTpl")
		}
		return a.callParent()
	},
	initRenderData : function() {
		return Ext.applyIf(this.callParent(), this.getLabelableRenderData())
	},
	getSubTplData : function() {
		var a = Ext.baseCSSPrefix;
		return {
			toolbarWrapCls : a + "html-editor-tb",
			textareaCls : a + "hidden",
			iframeName : Ext.id(),
			iframeSrc : Ext.SSL_SECURE_URL,
			size : "height:100px;"
		}
	},
	getSubTplMarkup : function() {
		return this.getTpl("fieldSubTpl").apply(this.getSubTplData())
	},
	getBodyNaturalWidth : function() {
		return 565
	},
	initFrameDoc : function() {
		var b = this, c, a;
		Ext.TaskManager.stop(b.monitorTask);
		c = b.getDoc();
		b.win = b.getWin();
		c.open();
		c.write(b.getDocMarkup());
		c.close();
		a = {
			run : function() {
				var d = b.getDoc();
				if (d.body || d.readyState === "complete") {
					Ext.TaskManager.stop(a);
					b.setDesignMode(true);
					Ext.defer(b.initEditor, 10, b)
				}
			},
			interval : 10,
			duration : 10000,
			scope : b
		};
		Ext.TaskManager.start(a)
	},
	checkDesignMode : function() {
		var a = this, b = a.getDoc();
		if (b && (!b.editorInitialized || a.getDesignMode() !== "on")) {
			a.initFrameDoc()
		}
	},
	setDesignMode : function(c) {
		var a = this, b = a.getDoc();
		if (b) {
			if (a.readOnly) {
				c = false
			}
			b.designMode = (/on|true/i).test(String(c).toLowerCase())
					? "on"
					: "off"
		}
	},
	getDesignMode : function() {
		var a = this.getDoc();
		return !a ? "" : String(a.designMode).toLowerCase()
	},
	disableItems : function(a) {
		this.getToolbar().items.each(function(b) {
					if (b.getItemId() !== "sourceedit") {
						b.setDisabled(a)
					}
				})
	},
	toggleSourceEdit : function(b) {
		var f = this, d = f.iframeEl, a = f.textareaEl, e = Ext.baseCSSPrefix
				+ "hidden", c = f.getToolbar().getComponent("sourceedit");
		if (!Ext.isBoolean(b)) {
			b = !f.sourceEditMode
		}
		f.sourceEditMode = b;
		if (c.pressed !== b) {
			c.toggle(b)
		}
		if (b) {
			f.disableItems(true);
			f.syncValue();
			d.addCls(e);
			a.removeCls(e);
			a.dom.removeAttribute("tabIndex");
			a.focus()
		} else {
			if (f.initialized) {
				f.disableItems(f.readOnly)
			}
			f.pushValue();
			d.removeCls(e);
			a.addCls(e);
			a.dom.setAttribute("tabIndex", -1);
			f.deferFocus()
		}
		f.fireEvent("editmodechange", f, b);
		f.doComponentLayout()
	},
	createLink : function() {
		var a = prompt(this.createLinkText, this.defaultLinkValue);
		if (a && a !== "http://") {
			this.relayCmd("createlink", a)
		}
	},
	clearInvalid : Ext.emptyFn,
	setValue : function(c) {
		var b = this, a = b.textareaEl;
		b.mixins.field.setValue.call(b, c);
		if (c === null || c === undefined) {
			c = ""
		}
		if (a) {
			a.dom.value = c
		}
		b.pushValue();
		return this
	},
	cleanHtml : function(a) {
		a = String(a);
		if (Ext.isWebKit) {
			a = a.replace(
					/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,
					"")
		}
		if (a.charCodeAt(0) === this.defaultValue.replace(/\D/g, "")) {
			a = a.substring(1)
		}
		return a
	},
	syncValue : function() {
		var e = this, b, d, a, c;
		if (e.initialized) {
			b = e.getEditorBody();
			d = b.innerHTML;
			if (Ext.isWebKit) {
				a = b.getAttribute("style");
				c = a.match(/text-align:(.*?);/i);
				if (c && c[1]) {
					d = '<div style="' + c[0] + '">' + d + "</div>"
				}
			}
			d = e.cleanHtml(d);
			if (e.fireEvent("beforesync", e, d) !== false) {
				e.textareaEl.dom.value = d;
				e.fireEvent("sync", e, d)
			}
		}
	},
	getValue : function() {
		var a = this, b;
		if (!a.sourceEditMode) {
			a.syncValue()
		}
		b = a.rendered ? a.textareaEl.dom.value : a.value;
		a.value = b;
		return b
	},
	pushValue : function() {
		var b = this, a;
		if (b.initialized) {
			a = b.textareaEl.dom.value || "";
			if (!b.activated && a.length < 1) {
				a = b.defaultValue
			}
			if (b.fireEvent("beforepush", b, a) !== false) {
				b.getEditorBody().innerHTML = a;
				if (Ext.isGecko) {
					b.setDesignMode(false);
					b.setDesignMode(true)
				}
				b.fireEvent("push", b, a)
			}
		}
	},
	deferFocus : function() {
		this.focus(false, true)
	},
	getFocusEl : function() {
		var a = this, b = a.win;
		return b && !a.sourceEditMode ? b : a.textareaEl
	},
	initEditor : function() {
		try {
			var f = this, d = f.getEditorBody(), b = f.textareaEl.getStyles(
					"font-size", "font-family", "background-image",
					"background-repeat", "background-color", "color"), h, c;
			b["background-attachment"] = "fixed";
			d.bgProperties = "fixed";
			Ext.core.DomHelper.applyStyles(d, b);
			h = f.getDoc();
			if (h) {
				try {
					Ext.EventManager.removeAll(h)
				} catch (g) {
				}
			}
			c = Ext.Function.bind(f.onEditorEvent, f);
			Ext.EventManager.on(h, {
						mousedown : c,
						dblclick : c,
						click : c,
						keyup : c,
						buffer : 100
					});
			c = f.onRelayedEvent;
			Ext.EventManager.on(h, {
						mousedown : c,
						mousemove : c,
						mouseup : c,
						click : c,
						dblclick : c,
						scope : f
					});
			if (Ext.isGecko) {
				Ext.EventManager.on(h, "keypress", f.applyCommand, f)
			}
			if (f.fixKeys) {
				Ext.EventManager.on(h, "keydown", f.fixKeys, f)
			}
			Ext.EventManager.on(window, "unload", f.beforeDestroy, f);
			h.editorInitialized = true;
			f.initialized = true;
			f.pushValue();
			f.setReadOnly(f.readOnly);
			f.fireEvent("initialize", f)
		} catch (a) {
		}
	},
	beforeDestroy : function() {
		var a = this, d = a.monitorTask, c, f;
		if (d) {
			Ext.TaskManager.stop(d)
		}
		if (a.rendered) {
			try {
				c = a.getDoc();
				if (c) {
					Ext.EventManager.removeAll(c);
					for (f in c) {
						if (c.hasOwnProperty(f)) {
							delete c[f]
						}
					}
				}
			} catch (b) {
			}
			Ext.destroyMembers("tb", "toolbarWrap", "iframeEl", "textareaEl")
		}
		a.callParent()
	},
	onRelayedEvent : function(c) {
		var b = this.iframeEl, d = b.getXY(), a = c.getXY();
		c.xy = [d[0] + a[0], d[1] + a[1]];
		c.injectEvent(b);
		c.xy = a
	},
	onFirstFocus : function() {
		var c = this, b, a;
		c.activated = true;
		c.disableItems(c.readOnly);
		if (Ext.isGecko) {
			c.win.focus();
			b = c.win.getSelection();
			if (!b.focusNode || b.focusNode.nodeType !== 3) {
				a = b.getRangeAt(0);
				a.selectNodeContents(c.getEditorBody());
				a.collapse(true);
				c.deferFocus()
			}
			try {
				c.execCmd("useCSS", true);
				c.execCmd("styleWithCSS", false)
			} catch (d) {
			}
		}
		c.fireEvent("activate", c)
	},
	adjustFont : function(d) {
		var e = d.getItemId() === "increasefontsize" ? 1 : -1, c = this
				.getDoc().queryCommandValue("FontSize")
				|| "2", a = Ext.isString(c) && c.indexOf("px") !== -1, b;
		c = parseInt(c, 10);
		if (a) {
			if (c <= 10) {
				c = 1 + e
			} else {
				if (c <= 13) {
					c = 2 + e
				} else {
					if (c <= 16) {
						c = 3 + e
					} else {
						if (c <= 18) {
							c = 4 + e
						} else {
							if (c <= 24) {
								c = 5 + e
							} else {
								c = 6 + e
							}
						}
					}
				}
			}
			c = Ext.Number.constrain(c, 1, 6)
		} else {
			b = Ext.isSafari;
			if (b) {
				e *= 2
			}
			c = Math.max(1, c + e) + (b ? "px" : 0)
		}
		this.execCmd("FontSize", c)
	},
	onEditorEvent : function(a) {
		this.updateToolbar()
	},
	updateToolbar : function() {
		var e = this, d, f, a, c;
		if (e.readOnly) {
			return
		}
		if (!e.activated) {
			e.onFirstFocus();
			return
		}
		d = e.getToolbar().items.map;
		f = e.getDoc();
		if (e.enableFont && !Ext.isSafari2) {
			a = (f.queryCommandValue("FontName") || e.defaultFont)
					.toLowerCase();
			c = e.fontSelect.dom;
			if (a !== c.value) {
				c.value = a
			}
		}
		function b() {
			Ext.Array.forEach(Ext.Array.toArray(arguments), function(g) {
						d[g].toggle(f.queryCommandState(g))
					})
		}
		if (e.enableFormat) {
			b("bold", "italic", "underline")
		}
		if (e.enableAlignments) {
			b("justifyleft", "justifycenter", "justifyright")
		}
		if (!Ext.isSafari2 && e.enableLists) {
			b("insertorderedlist", "insertunorderedlist")
		}
		Ext.menu.Manager.hideAll();
		e.syncValue()
	},
	relayBtnCmd : function(a) {
		this.relayCmd(a.getItemId())
	},
	relayCmd : function(b, a) {
		Ext.defer(function() {
					var c = this;
					c.focus();
					c.execCmd(b, a);
					c.updateToolbar()
				}, 10, this)
	},
	execCmd : function(d, c) {
		var b = this, e = b.getDoc(), a;
		e.execCommand(d, false, c === a ? null : c);
		b.syncValue()
	},
	applyCommand : function(d) {
		if (d.ctrlKey) {
			var a = this, f = d.getCharCode(), b;
			if (f > 0) {
				f = String.fromCharCode(f);
				switch (f) {
					case "b" :
						b = "bold";
						break;
					case "i" :
						b = "italic";
						break;
					case "u" :
						b = "underline";
						break
				}
				if (b) {
					a.win.focus();
					a.execCmd(b);
					a.deferFocus();
					d.preventDefault()
				}
			}
		}
	},
	insertAtCursor : function(c) {
		var b = this, a;
		if (b.activated) {
			b.win.focus();
			if (Ext.isIE) {
				a = b.getDoc().selection.createRange();
				if (a) {
					a.pasteHTML(c);
					b.syncValue();
					b.deferFocus()
				}
			} else {
				b.execCmd("InsertHTML", c);
				b.deferFocus()
			}
		}
	},
	fixKeys : function() {
		if (Ext.isIE) {
			return function(g) {
				var c = this, b = g.getKey(), f = c.getDoc(), a, d;
				if (b === g.TAB) {
					g.stopEvent();
					a = f.selection.createRange();
					if (a) {
						a.collapse(true);
						a.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");
						c.deferFocus()
					}
				} else {
					if (b === g.ENTER) {
						a = f.selection.createRange();
						if (a) {
							d = a.parentElement();
							if (!d || d.tagName.toLowerCase() !== "li") {
								g.stopEvent();
								a.pasteHTML("<br />");
								a.collapse(false);
								a.select()
							}
						}
					}
				}
			}
		}
		if (Ext.isOpera) {
			return function(b) {
				var a = this;
				if (b.getKey() === b.TAB) {
					b.stopEvent();
					a.win.focus();
					a.execCmd("InsertHTML", "&nbsp;&nbsp;&nbsp;&nbsp;");
					a.deferFocus()
				}
			}
		}
		if (Ext.isWebKit) {
			return function(c) {
				var b = this, a = c.getKey();
				if (a === c.TAB) {
					c.stopEvent();
					b.execCmd("InsertText", "\t");
					b.deferFocus()
				} else {
					if (a === c.ENTER) {
						c.stopEvent();
						b.execCmd("InsertHtml", "<br /><br />");
						b.deferFocus()
					}
				}
			}
		}
		return null
	}(),
	getToolbar : function() {
		return this.toolbar
	},
	buttonTips : {
		bold : {
			title : "Bold (Ctrl+B)",
			text : "Make the selected text bold.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		italic : {
			title : "Italic (Ctrl+I)",
			text : "Make the selected text italic.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		underline : {
			title : "Underline (Ctrl+U)",
			text : "Underline the selected text.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		increasefontsize : {
			title : "Grow Text",
			text : "Increase the font size.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		decreasefontsize : {
			title : "Shrink Text",
			text : "Decrease the font size.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		backcolor : {
			title : "Text Highlight Color",
			text : "Change the background color of the selected text.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		forecolor : {
			title : "Font Color",
			text : "Change the color of the selected text.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		justifyleft : {
			title : "Align Text Left",
			text : "Align text to the left.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		justifycenter : {
			title : "Center Text",
			text : "Center text in the editor.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		justifyright : {
			title : "Align Text Right",
			text : "Align text to the right.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		insertunorderedlist : {
			title : "Bullet List",
			text : "Start a bulleted list.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		insertorderedlist : {
			title : "Numbered List",
			text : "Start a numbered list.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		createlink : {
			title : "Hyperlink",
			text : "Make the selected text a hyperlink.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		},
		sourceedit : {
			title : "Source Edit",
			text : "Switch to source editing mode.",
			cls : Ext.baseCSSPrefix + "html-editor-tip"
		}
	}
});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.Notepad", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.form.field.HtmlEditor"],
	id : "notepad",
	init : function() {
		this.launcher = {
			text : "Notepad",
			iconCls : "notepad",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("notepad");
		if (!a) {
			a = b.createWindow({
				id : "notepad",
				title : "Notepad",
				width : 600,
				height : 400,
				iconCls : "notepad",
				animCollapse : false,
				border : false,
				hideMode : "offsets",
				layout : "fit",
				items : [{
					xtype : "htmleditor",
					id : "notepad-editor",
					value : [
							'Some <b>rich</b> <font color="red">text</font> goes <u>here</u><br>',
							"Give it a try!"].join("")
				}]
			})
		}
		a.show();
		return a
	}
});


Ext.define("MyDesktop.Services2", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.form.field.HtmlEditor"],
	id : "services2",
	init : function() {
		this.launcher = {
			text : "静态分析服务",
			iconCls : "notepad",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("services2");
		if (!a) {
			a = b.createWindow({
				id : "services2",
				title : "静态分析服务",
				width : 400,
				height : 400,
				iconCls : "notepad",
				animCollapse : false,
				border : false,
				hideMode : "offsets",
				//layout : "fit",
				items : [ 
					{
						xtype : "button",
						id  : "service1",
						text: "Codas",
						handler : function ()
						{
							var win = new Ext.Window({
									el : 'window1-win',
									title : 'Codas',
									layout : 'fit',
									width :550,
									height : 500,
									resizable : true,
									closeAction : 'hide',
									tbar : [
										{
											text : 'information',
											handler : function()
											{
											
												var infowin = new Ext.Window({
													title : "部署者信息",
													width : 350,
													height : 300,
													items :	{
														
														xtype : 'panel',
														width : '100%',
														height : '100%',
														html: '<p>服务开发者：  MASS<br></p><p>网址：  <a href="http://codas.seforge.org">codas.seforge.org</a><br></p><p>服务封装者：  MASS<br></p><p>联系人：  梁广泰<br></p><p>电子信箱：  lianggt08@sei.pku.edu.cn<br></p>'
												}
														//ServiceProviderDataView
														
												});
												infowin.show();
											
											}
											
											},
											{
												text : 'comment'
											},
										{text : 'monitoring'},
										{text : 'start'},
										{text : 'stop'},
										{text : 'restart'}
										],
									html : '<iframe src = "http://cdp.seforge.org/FindBugsAnalysis/FindBugs-index.jsp" scrolling="auto" width = "100%" height = "100%"></iframe>'
								});
								win.show();
							} 						
						},
						{
							xtype : "button",
							id  : "service2",
							text: "PMD",
							handler : function ()
							{
								var win = new Ext.Window({
										el : 'window2-win',
										title : 'PMD',
										layout : 'fit',
										width :550,
										height : 500,
										resizable : true,
										closeAction : 'hide',
										tbar : [
											{
											text : 'information',
											handler : function()
											{
											
												var infowin = new Ext.Window({
													title : "部署者信息",
													width : 350,
													height : 300,
													items :	{
														
														xtype : 'panel',
														width : '100%',
														height : '100%',
														html: '<p>服务开发者：  MASS<br></p><p>网址：  <a href="http://codas.seforge.org">codas.seforge.org</a><br></p><p>服务封装者：  MASS<br></p><p>联系人：  梁广泰<br></p><p>电子信箱：  lianggt08@sei.pku.edu.cn<br></p>'
												}
														//ServiceProviderDataView
														
												});
												infowin.show();
											
											}
											
											},
											{text : 'comment'},
											{text : 'monitoring'}
											],
										html : '<iframe src = "http://cdp.seforge.org/PMDAnalysis/PMD-index.jsp" width = "100%" height = "100%"></iframe>'		 											
									});
								win.show();
							} 					
						}]
			})
		}
		a.show();
		return a
	}
});

Ext.define("MyDesktop.Services1", {
	extend : "Ext.ux.desktop.Module",
	requires : ["Ext.form.field.HtmlEditor"],
	id : "services1",
	init : function() {
		this.launcher = {
			text : "文件转换服务",
			iconCls : "notepad",
			handler : this.createWindow,
			scope : this
		}
	},
	createWindow : function() {
		var b = this.app.getDesktop();
		var a = b.getWindow("services1");
		if (!a) {
			a = b.createWindow({
				id : "services1",
				title : "文件转换服务",
				width : 400,
				height : 400,
				iconCls : "notepad",
				animCollapse : false,
				border : false,
				hideMode : "offsets",
				//layout : "fit",
				items : [ 
					{
						xtype : "button",
						id  : "service1",
						text: "Word转TXT",
						handler : function ()
						{
							var win = new Ext.Window({
									el : 'window1-win',
									title : 'Word转TXT',
									layout : 'fit',
									width :300,
									height : 200,
									resizable : true,
									closeAction : 'hide',
									tbar : [
										{
											text : 'information',
											handler : function()
											{
											
												var infowin = new Ext.Window({
													title : "部署者信息",
													width : 350,
													height : 300,
													items :	{
														
														xtype : 'panel',
														width : '100%',
														height : '100%',
														html: '<p>服务开发者：  北京大学MASS组<br></p><p>网址：  <a href="http://www.sei.pku.edu.cn">www.sei.pku.edu.cn</a><br></p><p>服务封装者：  北京大学MASS组<br></p><p>联系人：  符璨<br></p><p>电子信箱：  fcloveclm@sina.com<br></p>'
												}
														//ServiceProviderDataView
														
												});
												infowin.show();
											
											}
											
											},
										{text : 'comment'},
										{text : 'monitoring'},
										{text : 'start'},
										{text : 'stop'},
										{text : 'restart'}
										],
									html : '<iframe src = "http://sase.seforge.org/fileFormatConversion/d2t.jsp" scrolling="auto" width = "100%" height = "100%"></iframe>'
								});
								win.show();
							} 						
						},
						{
							xtype : "button",
							id  : "service2",
							text: "TXT转Word",
							handler : function ()
							{
								var win = new Ext.Window({
										el : 'window2-win',
										title : 'TXT转Word',
										layout : 'fit',
										width :300,
										height : 200,
										resizable : true,
										closeAction : 'hide',
										tbar : [
											{
											text : 'information',
											handler : function()
											{
											
												var infowin = new Ext.Window({
													title : "部署者信息",
													width : 350,
													height : 300,
													items :	{
														
														xtype : 'panel',
														width : '100%',
														height : '100%',
														html: '<p>服务开发者：  北京大学MASS组<br></p><p>网址：  <a href="http://www.sei.pku.edu.cn">www.sei.pku.edu.cn</a><br></p><p>服务封装者：  北京大学MASS组<br></p><p>联系人：  符璨<br></p><p>电子信箱：  fcloveclm@sina.com<br></p>'
												}
														//ServiceProviderDataView
														
												});
												infowin.show();
											
											}
											
											},
											{text : 'comment'},
											{text : 'monitoring'}
											],
										html : '<iframe src = "http://sase.seforge.org/fileFormatConversion/t2d.jsp" width = "100%" height = "100%"></iframe>'
										 
											
									});
								win.show();
							} 					
						},
						{
							xtype : "button",
							id : "service3",
							text : "Excel转HTML",
							handler : function ()
							{
								var win = new Ext.Window({
									el : 'window3-win',
										title : 'Excel转HTML',
										layout : 'fit',
										width : 300,
										height : 200,
										resizable : true,
										closeAction : 'hide',
										tbar : [
											{
											text : 'information',
											handler : function()
											{
											
												var infowin = new Ext.Window({
													title : "部署者信息",
													width : 350,
													height : 300,
													items :	{
														
														xtype : 'panel',
														width : '100%',
														height : '100%',
														html: '<p>服务开发者：  北京大学MASS组<br></p><p>网址：  <a href="http://www.sei.pku.edu.cn">www.sei.pku.edu.cn</a><br></p><p>服务封装者：  北京大学MASS组<br></p><p>联系人：  符璨<br></p><p>电子信箱：  fcloveclm@sina.com<br></p>'
												}
														//ServiceProviderDataView
														
												});
												infowin.show();
											
											}
											
											},
											{text : 'comment'},
											{text : 'monitoring'}
											],
										html : '<iframe src = "http://sase.seforge.org/wordtopdf/e2h_upload.jsp" width = "100%" height = "100%"></iframe>'		
								});
								win.show();
							}
						}]
			})
		}
		a.show();
		return a
	}
});


/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.App", {
			extend : "Ext.ux.desktop.App",
			requires : ["Ext.window.MessageBox",
					"Ext.ux.desktop.ShortcutModel", "MyDesktop.SystemStatus",
					"MyDesktop.VideoWindow", "MyDesktop.GridWindow",
					"MyDesktop.TabWindow", "MyDesktop.AccordionWindow",
					"MyDesktop.Notepad","MyDesktop.Services1", "MyDesktop.Services2","MyDesktop.BogusMenuModule",
					"MyDesktop.BogusModule", "MyDesktop.Settings"],
			init : function() {
				this.callParent()
			},
			getModules : function() {
				var a = [
					
					new MyDesktop.Services1(),
					new MyDesktop.Services2()
					];
				return a; 
				//[
						//new MyDesktop.VideoWindow(),
				//		new MyDesktop.SystemStatus(),
						//new MyDesktop.GridWindow(), 
						//new MyDesktop.TabWindow(),
						//new MyDesktop.AccordionWindow(),
						//new MyDesktop.Notepad(),
				//		new MyDesktop.Services()]
						//,
						//new MyDesktop.BogusMenuModule(),
						//new MyDesktop.BogusModule()]
			},
			getDesktopConfig : function() {
				var b = this, a = b.callParent();
				return Ext.apply(a, {
							contextMenuItems : [{
										text : "Change Settings",
										handler : b.onSettings,
										scope : b
									}],
							shortcuts : Ext.create("Ext.data.Store", {
										model : "Ext.ux.desktop.ShortcutModel",
										data : [
												/*{
													name : "Grid Window",
													iconCls : "grid-shortcut",
													module : "grid-win"
												}, 
												{
													name : "Accordion Window",
													iconCls : "accordion-shortcut",
													module : "acc-win"
												},
												{
													name : "Notepad",
													iconCls : "notepad-shortcut",
													module : "notepad"
												},*/
												{
													name : "文件转换服务",
													iconCls : "notepad-shortcut",
													module : "services1"
												},{
													name : "静态分析服务",
													iconCls : "notepad-shortcut",
													module : "services2"
												}
												/*,{
													name : "System Status",
													iconCls : "cpu-shortcut",
													module : "systemstatus"
												}*/]
									}),
							wallpaper : "wallpapers/Blue-Sencha.jpg",
							wallpaperStretch : false
						})
			},
			getStartConfig : function() {
				var b = this, a = b.callParent();
				return Ext.apply(a, {
							title : "Don Griffin",
							iconCls : "user",
							height : 300,
							toolConfig : {
								width : 100,
								items : [{
											text : "Settings",
											iconCls : "settings",
											handler : b.onSettings,
											scope : b
										}, "-", {
											text : "Logout",
											iconCls : "logout",
											handler : b.onLogout,
											scope : b
										}]
							}
						})
			},
			getTaskbarConfig : function() {
				var a = this.callParent();
				return Ext.apply(a, {
							quickStart : [{
										name : "Accordion Window",
										iconCls : "accordion",
										module : "acc-win"
									}, {
										name : "Grid Window",
										iconCls : "icon-grid",
										module : "grid-win"
									}],
							trayItems : [{
										xtype : "trayclock",
										flex : 1
									}]
						})
			},
			onLogout : function() {
				Ext.Msg.confirm("Logout", "Are you sure you want to logout?")
			},
			onSettings : function() {
				var a = new MyDesktop.Settings({
							desktop : this.desktop
						});
				a.show()
			}
		});
Ext.define("Ext.util.Point", {
	extend : "Ext.util.Region",
	statics : {
		fromEvent : function(a) {
			a = (a.changedTouches && a.changedTouches.length > 0)
					? a.changedTouches[0]
					: a;
			return new this(a.pageX, a.pageY)
		}
	},
	constructor : function(a, b) {
		this.callParent([b, a, b, a])
	},
	toString : function() {
		return "Point[" + this.x + "," + this.y + "]"
	},
	equals : function(a) {
		return (this.x == a.x && this.y == a.y)
	},
	isWithin : function(b, a) {
		if (!Ext.isObject(a)) {
			a = {
				x : a,
				y : a
			}
		}
		return (this.x <= b.x + a.x && this.x >= b.x - a.x
				&& this.y <= b.y + a.y && this.y >= b.y - a.y)
	},
	roundedEquals : function(a) {
		return (Math.round(this.x) == Math.round(a.x) && Math.round(this.y) == Math
				.round(a.y))
	}
}, function() {
	this.prototype.translate = Ext.util.Region.prototype.translateBy
});
Ext.define("Ext.Layer", {
	uses : ["Ext.Shadow"],
	statics : {
		shims : []
	},
	extend : "Ext.core.Element",
	constructor : function(b, a) {
		b = b || {};
		var c = this, d = Ext.core.DomHelper, f = b.parentEl, e = f ? Ext
				.getDom(f) : document.body, g = b.hideMode;
		if (a) {
			c.dom = Ext.getDom(a)
		}
		if (!c.dom) {
			c.dom = d.append(e, b.dh || {
						tag : "div",
						cls : Ext.baseCSSPrefix + "layer"
					})
		} else {
			c.addCls(Ext.baseCSSPrefix + "layer");
			if (!c.dom.parentNode) {
				e.appendChild(c.dom)
			}
		}
		if (b.cls) {
			c.addCls(b.cls)
		}
		c.constrain = b.constrain !== false;
		if (g) {
			c.setVisibilityMode(Ext.core.Element[g.toUpperCase()]);
			if (c.visibilityMode == Ext.core.Element.ASCLASS) {
				c.visibilityCls = b.visibilityCls
			}
		} else {
			if (b.useDisplay) {
				c.setVisibilityMode(Ext.core.Element.DISPLAY)
			} else {
				c.setVisibilityMode(Ext.core.Element.VISIBILITY)
			}
		}
		if (b.id) {
			c.id = c.dom.id = b.id
		} else {
			c.id = Ext.id(c.dom)
		}
		c.position("absolute");
		if (b.shadow) {
			c.shadowOffset = b.shadowOffset || 4;
			c.shadow = Ext.create("Ext.Shadow", {
						offset : c.shadowOffset,
						mode : b.shadow
					});
			c.disableShadow()
		} else {
			c.shadowOffset = 0
		}
		c.useShim = b.shim !== false && Ext.useShims;
		if (b.hidden === true) {
			c.hide()
		} else {
			this.show()
		}
	},
	getZIndex : function() {
		return parseInt((this.getShim() || this).getStyle("z-index"), 10)
	},
	getShim : function() {
		var b = this, c, a;
		if (!b.useShim) {
			return null
		}
		if (!b.shim) {
			c = b.self.shims.shift();
			if (!c) {
				c = b.createShim();
				c.enableDisplayMode("block");
				c.hide()
			}
			a = b.dom.parentNode;
			if (c.dom.parentNode != a) {
				a.insertBefore(c.dom, b.dom)
			}
			b.shim = c
		}
		return b.shim
	},
	hideShim : function() {
		if (this.shim) {
			this.shim.setDisplayed(false);
			this.self.shims.push(this.shim);
			delete this.shim
		}
	},
	disableShadow : function() {
		if (this.shadow) {
			this.shadowDisabled = true;
			this.shadow.hide();
			this.lastShadowOffset = this.shadowOffset;
			this.shadowOffset = 0
		}
	},
	enableShadow : function(a) {
		if (this.shadow) {
			this.shadowDisabled = false;
			this.shadowOffset = this.lastShadowOffset;
			delete this.lastShadowOffset;
			if (a) {
				this.sync(true)
			}
		}
	},
	sync : function(b) {
		var i = this, m = i.shadow, g, e, a;
		if (!this.updating && this.isVisible() && (m || this.useShim)) {
			var d = this.getShim(), c = this.getLeft(true), n = this
					.getTop(true), k = this.getWidth(), f = this.getHeight(), j;
			if (m && !this.shadowDisabled) {
				if (b && !m.isVisible()) {
					m.show(this)
				} else {
					m.realign(c, n, k, f)
				}
				if (d) {
					j = d.getStyle("z-index");
					if (j > i.zindex) {
						i.shim.setStyle("z-index", i.zindex - 2)
					}
					d.show();
					if (m.isVisible()) {
						g = m.el.getXY();
						e = d.dom.style;
						a = m.el.getSize();
						e.left = (g[0]) + "px";
						e.top = (g[1]) + "px";
						e.width = (a.width) + "px";
						e.height = (a.height) + "px"
					} else {
						d.setSize(k, f);
						d.setLeftTop(c, n)
					}
				}
			} else {
				if (d) {
					j = d.getStyle("z-index");
					if (j > i.zindex) {
						i.shim.setStyle("z-index", i.zindex - 2)
					}
					d.show();
					d.setSize(k, f);
					d.setLeftTop(c, n)
				}
			}
		}
		return this
	},
	remove : function() {
		this.hideUnders();
		this.callParent()
	},
	beginUpdate : function() {
		this.updating = true
	},
	endUpdate : function() {
		this.updating = false;
		this.sync(true)
	},
	hideUnders : function() {
		if (this.shadow) {
			this.shadow.hide()
		}
		this.hideShim()
	},
	constrainXY : function() {
		if (this.constrain) {
			var f = Ext.core.Element.getViewWidth(), b = Ext.core.Element
					.getViewHeight(), k = Ext.getDoc().getScroll(), j = this
					.getXY(), g = j[0], e = j[1], a = this.shadowOffset, i = this.dom.offsetWidth
					+ a, c = this.dom.offsetHeight + a, d = false;
			if ((g + i) > f + k.left) {
				g = f - i - a;
				d = true
			}
			if ((e + c) > b + k.top) {
				e = b - c - a;
				d = true
			}
			if (g < k.left) {
				g = k.left;
				d = true
			}
			if (e < k.top) {
				e = k.top;
				d = true
			}
			if (d) {
				Ext.Layer.superclass.setXY.call(this, [g, e]);
				this.sync()
			}
		}
		return this
	},
	getConstrainOffset : function() {
		return this.shadowOffset
	},
	setVisible : function(e, b, d, g, f) {
		var c = this, a;
		a = function() {
			if (e) {
				c.sync(true)
			}
			if (g) {
				g()
			}
		};
		if (!e) {
			this.hideUnders(true)
		}
		this.callParent([e, b, d, g, f]);
		if (!b) {
			a()
		}
		return this
	},
	beforeFx : function() {
		this.beforeAction();
		return this.callParent(arguments)
	},
	afterFx : function() {
		this.callParent(arguments);
		this.sync(this.isVisible())
	},
	beforeAction : function() {
		if (!this.updating && this.shadow) {
			this.shadow.hide()
		}
	},
	setLeft : function(a) {
		this.callParent(arguments);
		return this.sync()
	},
	setTop : function(a) {
		this.callParent(arguments);
		return this.sync()
	},
	setLeftTop : function(b, a) {
		this.callParent(arguments);
		return this.sync()
	},
	setXY : function(c, a, b, e, d) {
		e = this.createCB(e);
		this.fixDisplay();
		this.beforeAction();
		this.callParent([c, a, b, e, d]);
		if (!a) {
			e()
		}
		return this
	},
	createCB : function(c) {
		var a = this, b = a.shadow && a.shadow.isVisible();
		return function() {
			a.constrainXY();
			a.sync(b);
			if (c) {
				c()
			}
		}
	},
	setX : function(a, b, c, e, d) {
		this.setXY([a, this.getY()], b, c, e, d);
		return this
	},
	setY : function(e, a, b, d, c) {
		this.setXY([this.getX(), e], a, b, d, c);
		return this
	},
	setSize : function(a, c, b, d, f, e) {
		f = this.createCB(f);
		this.beforeAction();
		this.callParent([a, c, b, d, f, e]);
		if (!b) {
			f()
		}
		return this
	},
	setWidth : function(a, b, c, e, d) {
		e = this.createCB(e);
		this.beforeAction();
		this.callParent([a, b, c, e, d]);
		if (!b) {
			e()
		}
		return this
	},
	setHeight : function(b, a, c, e, d) {
		e = this.createCB(e);
		this.beforeAction();
		this.callParent([b, a, c, e, d]);
		if (!a) {
			e()
		}
		return this
	},
	setBounds : function(b, h, d, a, c, e, g, f) {
		g = this.createCB(g);
		this.beforeAction();
		if (!c) {
			Ext.Layer.superclass.setXY.call(this, [b, h]);
			Ext.Layer.superclass.setSize.call(this, d, a);
			g()
		} else {
			this.callParent([b, h, d, a, c, e, g, f])
		}
		return this
	},
	setZIndex : function(a) {
		this.zindex = a;
		if (this.getShim()) {
			this.shim.setStyle("z-index", a++)
		}
		if (this.shadow) {
			this.shadow.setZIndex(a++)
		}
		this.setStyle("z-index", a);
		return this
	}
});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.Video", {
	extend : "Ext.panel.Panel",
	alias : "widget.video",
	width : "100%",
	height : "100%",
	autoplay : false,
	controls : true,
	bodyStyle : "background-color:#000;color:#fff",
	html : "",
	initComponent : function() {
		this.callParent()
	},
	afterRender : function() {
		var g;
		if (this.fallbackHTML) {
			g = this.fallbackHTML
		} else {
			g = "Your browser does not support HTML5 Video. ";
			if (Ext.isChrome) {
				g += "Upgrade Chrome."
			} else {
				if (Ext.isGecko) {
					g += "Upgrade to Firefox 3.5 or newer."
				} else {
					var b = '<a href="http://www.google.com/chrome">Chrome</a>';
					g += 'Please try <a href="http://www.mozilla.com">Firefox</a>';
					if (Ext.isIE) {
						g += ", "
								+ b
								+ ' or <a href="http://www.google.com/chromeframe">Chrome Frame for IE</a>.'
					} else {
						g += " or " + b + "."
					}
				}
			}
		}
		var e = this.getSize();
		var c = Ext.copyTo({
					tag : "video",
					width : e.width,
					height : e.height
				}, this,
				"poster,start,loopstart,loopend,playcount,autobuffer,loop");
		if (this.autoplay) {
			c.autoplay = 1
		}
		if (this.controls) {
			c.controls = 1
		}
		if (Ext.isArray(this.src)) {
			c.children = [];
			for (var d = 0, a = this.src.length; d < a; d++) {
				if (!Ext.isObject(this.src[d])) {
					Ext.Error
							.raise('The src list passed to "video" must be an array of objects')
				}
				c.children.push(Ext.applyIf({
							tag : "source"
						}, this.src[d]))
			}
			c.children.push({
						html : g
					})
		} else {
			c.src = this.src;
			c.html = g
		}
		this.video = this.body.createChild(c);
		var f = this.video.dom;
		this.supported = (f && f.tagName.toLowerCase() == "video")
	},
	doComponentLayout : function() {
		var a = this;
		a.callParent(arguments);
		if (a.video) {
			a.video.setSize(a.body.getSize())
		}
	},
	onDestroy : function() {
		var b = this.video;
		if (b) {
			var a = b.dom;
			if (a && a.pause) {
				a.pause()
			}
			b.remove();
			this.video = null
		}
		this.callParent()
	}
});
Ext.define("Ext.resizer.Resizer", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			uses : ["Ext.resizer.ResizeTracker", "Ext.Component"],
			alternateClassName : "Ext.Resizable",
			handleCls : Ext.baseCSSPrefix + "resizable-handle",
			pinnedCls : Ext.baseCSSPrefix + "resizable-pinned",
			overCls : Ext.baseCSSPrefix + "resizable-over",
			proxyCls : Ext.baseCSSPrefix + "resizable-proxy",
			wrapCls : Ext.baseCSSPrefix + "resizable-wrap",
			dynamic : true,
			handles : "s e se",
			height : null,
			width : null,
			minHeight : 20,
			minWidth : 20,
			maxHeight : 10000,
			maxWidth : 10000,
			pinned : false,
			preserveRatio : false,
			transparent : false,
			possiblePositions : {
				n : "north",
				s : "south",
				e : "east",
				w : "west",
				se : "southeast",
				sw : "southwest",
				nw : "northwest",
				ne : "northeast"
			},
			constructor : function(a) {
				var g = this, f, l, k = g.handles, b, j, e, c = 0, h;
				this.addEvents("beforeresize", "resizedrag", "resize");
				if (Ext.isString(a) || Ext.isElement(a) || a.dom) {
					f = a;
					a = arguments[1] || {};
					a.target = f
				}
				g.mixins.observable.constructor.call(g, a);
				f = g.target;
				if (f) {
					if (f.isComponent) {
						g.el = f.getEl();
						if (f.minWidth) {
							g.minWidth = f.minWidth
						}
						if (f.minHeight) {
							g.minHeight = f.minHeight
						}
						if (f.maxWidth) {
							g.maxWidth = f.maxWidth
						}
						if (f.maxHeight) {
							g.maxHeight = f.maxHeight
						}
						if (f.floating) {
							if (!this.hasOwnProperty("handles")) {
								this.handles = "n ne e se s sw w nw"
							}
						}
					} else {
						g.el = g.target = Ext.get(f)
					}
				} else {
					g.target = g.el = Ext.get(g.el)
				}
				l = g.el.dom.tagName;
				if (l == "TEXTAREA" || l == "IMG") {
					g.originalTarget = g.target;
					g.target = g.el = g.el.wrap({
								cls : g.wrapCls,
								id : g.el.id + "-rzwrap"
							});
					g.el.setPositioning(g.originalTarget.getPositioning());
					g.originalTarget.clearPositioning();
					var d = g.originalTarget.getBox();
					g.el.setBox(d)
				}
				g.el.position();
				if (g.pinned) {
					g.el.addCls(g.pinnedCls)
				}
				g.resizeTracker = Ext.create("Ext.resizer.ResizeTracker", {
							disabled : g.disabled,
							target : g.target,
							constrainTo : g.constrainTo,
							overCls : g.overCls,
							throttle : g.throttle,
							originalTarget : g.originalTarget,
							delegate : "." + g.handleCls,
							dynamic : g.dynamic,
							preserveRatio : g.preserveRatio,
							minHeight : g.minHeight,
							maxHeight : g.maxHeight,
							minWidth : g.minWidth,
							maxWidth : g.maxWidth
						});
				g.resizeTracker.on("mousedown", g.onBeforeResize, g);
				g.resizeTracker.on("drag", g.onResize, g);
				g.resizeTracker.on("dragend", g.onResizeEnd, g);
				if (g.handles == "all") {
					g.handles = "n s e w ne nw se sw"
				}
				k = g.handles = g.handles.split(/ |\s*?[,;]\s*?/);
				j = g.possiblePositions;
				e = k.length;
				b = g.handleCls
						+ " "
						+ (this.target.isComponent
								? (g.target.baseCls + "-handle ")
								: "") + g.handleCls + "-";
				for (; c < e; c++) {
					if (k[c] && j[k[c]]) {
						h = j[k[c]];
						g[h] = Ext.create("Ext.Component", {
									owner : this,
									region : h,
									cls : b + h,
									renderTo : g.el
								});
						g[h].el.unselectable();
						if (g.transparent) {
							g[h].el.setOpacity(0)
						}
					}
				}
				if (Ext.isNumber(g.width)) {
					g.width = Ext.Number.constrain(g.width, g.minWidth,
							g.maxWidth)
				}
				if (Ext.isNumber(g.height)) {
					g.height = Ext.Number.constrain(g.height, g.minHeight,
							g.maxHeight)
				}
				if (g.width != null || g.height != null) {
					if (g.originalTarget) {
						g.originalTarget.setWidth(g.width);
						g.originalTarget.setHeight(g.height)
					}
					g.resizeTo(g.width, g.height)
				}
				g.forceHandlesHeight()
			},
			disable : function() {
				this.resizeTracker.disable()
			},
			enable : function() {
				this.resizeTracker.enable()
			},
			onBeforeResize : function(c, d) {
				var a = this.target.getBox();
				return this.fireEvent("beforeresize", this, a.width, a.height,
						d)
			},
			onResize : function(d, f) {
				var c = this, a = c.target.getBox();
				c.forceHandlesHeight();
				return c.fireEvent("resizedrag", c, a.width, a.height, f)
			},
			onResizeEnd : function(d, f) {
				var c = this, a = c.target.getBox();
				c.forceHandlesHeight();
				return c.fireEvent("resize", c, a.width, a.height, f)
			},
			resizeTo : function(b, a) {
				this.target.setSize(b, a);
				this.fireEvent("resize", this, b, a, null)
			},
			getEl : function() {
				return this.el
			},
			getTarget : function() {
				return this.target
			},
			destroy : function() {
				var c;
				for (var b = 0, a = this.handles.length; b < a; b++) {
					c = this[this.possiblePositions[this.handles[b]]];
					delete c.owner;
					Ext.destroy(c)
				}
			},
			forceHandlesHeight : function() {
				var a = this, b;
				if (Ext.isIE6) {
					b = a.east;
					if (b) {
						b.setHeight(a.el.getHeight())
					}
					b = a.west;
					if (b) {
						b.setHeight(a.el.getHeight())
					}
					a.el.repaint()
				}
			}
		});
Ext.define("Ext.panel.Tool", {
	extend : "Ext.Component",
	requires : ["Ext.tip.QuickTipManager"],
	alias : "widget.tool",
	baseCls : Ext.baseCSSPrefix + "tool",
	disabledCls : Ext.baseCSSPrefix + "tool-disabled",
	toolPressedCls : Ext.baseCSSPrefix + "tool-pressed",
	toolOverCls : Ext.baseCSSPrefix + "tool-over",
	ariaRole : "button",
	renderTpl : ['<img src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],
	stopEvent : true,
	initComponent : function() {
		var a = this;
		a.addEvents("click");
		a.type = a.type || a.id;
		Ext.applyIf(a.renderData, {
					baseCls : a.baseCls,
					blank : Ext.BLANK_IMAGE_URL,
					type : a.type
				});
		a.renderSelectors.toolEl = "." + a.baseCls + "-" + a.type;
		a.callParent()
	},
	afterRender : function() {
		var a = this;
		a.callParent(arguments);
		if (a.qtip) {
			if (Ext.isObject(a.qtip)) {
				Ext.tip.QuickTipManager.register(Ext.apply({
							target : a.id
						}, a.qtip))
			} else {
				a.toolEl.dom.qtip = a.qtip
			}
		}
		a.mon(a.toolEl, {
					click : a.onClick,
					mousedown : a.onMouseDown,
					mouseover : a.onMouseOver,
					mouseout : a.onMouseOut,
					scope : a
				})
	},
	setType : function(a) {
		var b = this;
		b.type = a;
		if (b.rendered) {
			b.toolEl.dom.className = b.baseCls + "-" + a
		}
		return b
	},
	bindTo : function(a) {
		this.owner = a
	},
	onClick : function(d, c) {
		var b = this, a;
		if (b.disabled) {
			return false
		}
		a = b.owner || b.ownerCt;
		b.el.removeCls(b.toolPressedCls);
		b.el.removeCls(b.toolOverCls);
		if (b.stopEvent !== false) {
			d.stopEvent()
		}
		Ext.callback(b.handler, b.scope || b, [d, c, a, b]);
		b.fireEvent("click", b, d);
		return true
	},
	onDestroy : function() {
		if (Ext.isObject(this.tooltip)) {
			Ext.tip.QuickTipManager.unregister(this.id)
		}
		this.callParent()
	},
	onMouseDown : function() {
		if (this.disabled) {
			return false
		}
		this.el.addCls(this.toolPressedCls)
	},
	onMouseOver : function() {
		if (this.disabled) {
			return false
		}
		this.el.addCls(this.toolOverCls)
	},
	onMouseOut : function() {
		this.el.removeCls(this.toolOverCls)
	}
});
Ext.define("Ext.util.CSS", function() {
			var d = null;
			var c = document;
			var b = /(-[a-z])/gi;
			var a = function(e, f) {
				return f.charAt(1).toUpperCase()
			};
			return {
				singleton : true,
				constructor : function() {
					this.rules = {};
					this.initialized = false
				},
				createStyleSheet : function(h, k) {
					var g, f = c.getElementsByTagName("head")[0], j = c
							.createElement("style");
					j.setAttribute("type", "text/css");
					if (k) {
						j.setAttribute("id", k)
					}
					if (Ext.isIE) {
						f.appendChild(j);
						g = j.styleSheet;
						g.cssText = h
					} else {
						try {
							j.appendChild(c.createTextNode(h))
						} catch (i) {
							j.cssText = h
						}
						f.appendChild(j);
						g = j.styleSheet
								? j.styleSheet
								: (j.sheet || c.styleSheets[c.styleSheets.length
										- 1])
					}
					this.cacheStyleSheet(g);
					return g
				},
				removeStyleSheet : function(f) {
					var e = document.getElementById(f);
					if (e) {
						e.parentNode.removeChild(e)
					}
				},
				swapStyleSheet : function(h, e) {
					var g = document;
					this.removeStyleSheet(h);
					var f = g.createElement("link");
					f.setAttribute("rel", "stylesheet");
					f.setAttribute("type", "text/css");
					f.setAttribute("id", h);
					f.setAttribute("href", e);
					g.getElementsByTagName("head")[0].appendChild(f)
				},
				refreshCache : function() {
					return this.getRules(true)
				},
				cacheStyleSheet : function(k) {
					if (!d) {
						d = {}
					}
					try {
						var n = k.cssRules || k.rules, l, h = n.length - 1, f, g;
						for (; h >= 0; --h) {
							l = n[h].selectorText;
							if (l) {
								l = l.split(",");
								g = l.length;
								for (f = 0; f < g; f++) {
									d[Ext.String.trim(l[f]).toLowerCase()] = n[h]
								}
							}
						}
					} catch (m) {
					}
				},
				getRules : function(g) {
					if (d === null || g) {
						d = {};
						var j = c.styleSheets, h = 0, f = j.length;
						for (; h < f; h++) {
							try {
								if (!j[h].disabled) {
									this.cacheStyleSheet(j[h])
								}
							} catch (k) {
							}
						}
					}
					return d
				},
				getRule : function(e, g) {
					var f = this.getRules(g);
					if (!Ext.isArray(e)) {
						return f[e.toLowerCase()]
					}
					for (var h = 0; h < e.length; h++) {
						if (f[e[h]]) {
							return f[e[h].toLowerCase()]
						}
					}
					return null
				},
				updateRule : function(e, h, g) {
					if (!Ext.isArray(e)) {
						var j = this.getRule(e);
						if (j) {
							j.style[h.replace(b, a)] = g;
							return true
						}
					} else {
						for (var f = 0; f < e.length; f++) {
							if (this.updateRule(e[f], h, g)) {
								return true
							}
						}
					}
					return false
				}
			}
		}());
Ext.define("Ext.grid.ColumnLayout", {
	extend : "Ext.layout.container.HBox",
	alias : "layout.gridcolumn",
	type : "column",
	clearInnerCtOnLayout : false,
	constructor : function() {
		var a = this;
		a.callParent(arguments);
		if (!Ext.isDefined(a.availableSpaceOffset)) {
			a.availableSpaceOffset = (Ext.getScrollBarWidth() - 2)
		}
	},
	beforeLayout : function() {
		var f = this, c = 0, b = f.getLayoutItems(), a = b.length, e, d;
		d = f.callParent(arguments);
		f.innerCt.setHeight(23);
		if (f.align == "stretchmax") {
			for (; c < a; c++) {
				e = b[c];
				e.el.setStyle({
							height : "auto"
						});
				e.titleContainer.setStyle({
							height : "auto",
							paddingTop : "0"
						});
				if (e.componentLayout && e.componentLayout.lastComponentSize) {
					e.componentLayout.lastComponentSize.height = e.el.dom.offsetHeight
				}
			}
		}
		return d
	},
	calculateChildBoxes : function(k, c) {
		var h = this, b = h.callParent(arguments), f = b.boxes, a = b.meta, g = f.length, d = 0, e, j;
		if (c.width && !h.isColumn) {
			if (h.owner.forceFit) {
				for (; d < g; d++) {
					e = f[d];
					j = e.component;
					j.minWidth = Ext.grid.plugin.HeaderResizer.prototype.minColWidth;
					j.flex = e.width
				}
				b = h.callParent(arguments)
			} else {
				if (a.tooNarrow) {
					c.width = a.desiredSize
				}
			}
		}
		return b
	},
	afterLayout : function() {
		var d = this, c = 0, b = d.getLayoutItems(), a = b.length;
		d.callParent(arguments);
		if (d.align == "stretchmax") {
			for (; c < a; c++) {
				b[c].setPadding()
			}
		}
	},
	updateInnerCtSize : function(b, d) {
		var c = this, a = 0;
		if (!c.isColumn && d.meta.tooNarrow) {
			if (Ext.isWebKit
					|| Ext.isGecko
					|| (Ext.isIEQuirks && (Ext.isIE6 || Ext.isIE7 || Ext.isIE8))) {
				a = 1
			} else {
				if (Ext.isIE6 || Ext.isIE7 || Ext.isIE8) {
					a = 2
				}
			}
			a++;
			b.width = d.meta.desiredSize
					+ (c.reserveOffset ? c.availableSpaceOffset : 0) + a
		}
		return c.callParent(arguments)
	},
	doOwnerCtLayouts : function() {
		var a = this.owner.ownerCt;
		if (!a.componentLayout.layoutBusy) {
			a.doComponentLayout()
		}
	}
});
Ext.define("Ext.grid.plugin.HeaderResizer", {
	extend : "Ext.util.Observable",
	requires : ["Ext.dd.DragTracker", "Ext.util.Region"],
	alias : "plugin.gridheaderresizer",
	disabled : false,
	configs : {
		dynamic : true
	},
	colHeaderCls : Ext.baseCSSPrefix + "column-header",
	minColWidth : 40,
	maxColWidth : 1000,
	wResizeCursor : "col-resize",
	eResizeCursor : "col-resize",
	init : function(a) {
		this.headerCt = a;
		a.on("render", this.afterHeaderRender, this, {
					single : true
				})
	},
	destroy : function() {
		if (this.tracker) {
			this.tracker.destroy()
		}
	},
	afterHeaderRender : function() {
		var b = this.headerCt, a = b.el;
		b.mon(a, "mousemove", this.onHeaderCtMouseMove, this);
		this.tracker = Ext.create("Ext.dd.DragTracker", {
					disabled : this.disabled,
					onBeforeStart : Ext.Function.bind(this.onBeforeStart, this),
					onStart : Ext.Function.bind(this.onStart, this),
					onDrag : Ext.Function.bind(this.onDrag, this),
					onEnd : Ext.Function.bind(this.onEnd, this),
					tolerance : 3,
					autoStart : 300,
					el : a
				})
	},
	onHeaderCtMouseMove : function(c, a) {
		if (this.headerCt.dragging) {
			if (this.activeHd) {
				this.activeHd.el.dom.style.cursor = "";
				delete this.activeHd
			}
		} else {
			var f = c.getTarget("." + this.colHeaderCls, 3, true), b, d;
			if (f) {
				b = Ext.getCmp(f.id);
				if (b.isOnLeftEdge(c)) {
					d = b
							.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])")
				} else {
					if (b.isOnRightEdge(c)) {
						d = b
					} else {
						d = null
					}
				}
				if (d) {
					if (d.isGroupHeader) {
						d = d.getVisibleGridColumns();
						d = d[d.length - 1]
					}
					if (d && !d.fixed) {
						this.activeHd = d;
						b.el.dom.style.cursor = this.eResizeCursor
					}
				} else {
					b.el.dom.style.cursor = "";
					delete this.activeHd
				}
			}
		}
	},
	onBeforeStart : function(b) {
		var a = b.getTarget();
		this.dragHd = this.activeHd;
		if (!!this.dragHd && !Ext.fly(a).hasCls("x-column-header-trigger")
				&& !this.headerCt.dragging) {
			this.tracker.constrainTo = this.getConstrainRegion();
			return true
		} else {
			this.headerCt.dragging = false;
			return false
		}
	},
	getConstrainRegion : function() {
		var a = this.dragHd.el, b = Ext.util.Region.getRegion(a);
		return b
				.adjust(0, this.maxColWidth - a.getWidth(), 0, this.minColWidth)
	},
	onStart : function(s) {
		var u = this, g = u.dragHd, b = g.el, n = b.getWidth(), i = u.headerCt, k = s
				.getTarget();
		if (u.dragHd && !Ext.fly(k).hasCls("x-column-header-trigger")) {
			i.dragging = true
		}
		u.origWidth = n;
		if (!u.dynamic) {
			var d = b.getXY(), q = i.up("[scrollerOwner]"), f = u.dragHd
					.up(":not([isGroupHeader])"), j = f.up(), c = q
					.getLhsMarker(), m = q.getRhsMarker(), a = m.parent(), h = a
					.getLeft(true), r = a.getTop(true), p = a
					.translatePoints(d), o = j.body.getHeight() + i.getHeight(), l = p.top
					- r;
			c.setTop(l);
			m.setTop(l);
			c.setHeight(o);
			m.setHeight(o);
			c.setLeft(p.left - h);
			m.setLeft(p.left + n - h)
		}
	},
	onDrag : function(g) {
		if (!this.dynamic) {
			var f = this.tracker.getXY("point"), a = this.headerCt
					.up("[scrollerOwner]"), h = a.getRhsMarker(), c = h
					.parent(), b = c.translatePoints(f), d = c.getLeft(true);
			h.setLeft(b.left - d)
		} else {
			this.doResize()
		}
	},
	onEnd : function(g) {
		this.headerCt.dragging = false;
		if (this.dragHd) {
			if (!this.dynamic) {
				var f = this.dragHd, c = this.headerCt.up("[scrollerOwner]"), d = c
						.getLhsMarker(), i = c.getRhsMarker(), a = f.getWidth(), h = this.tracker
						.getOffset("point"), b = -9999;
				d.setLeft(b);
				i.setLeft(b)
			}
			this.doResize()
		}
	},
	doResize : function() {
		if (this.dragHd) {
			var b = this.dragHd, a, c = this.tracker.getOffset("point");
			if (b.flex) {
				delete b.flex
			}
			if (this.headerCt.forceFit) {
				a = b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");
				if (a) {
					this.headerCt.componentLayout.layoutBusy = true
				}
			}
			b.minWidth = this.origWidth + c[0];
			b.setWidth(b.minWidth);
			if (a) {
				delete a.flex;
				a.setWidth(a.getWidth() - c[0]);
				this.headerCt.componentLayout.layoutBusy = false;
				this.headerCt.doComponentLayout()
			}
		}
	},
	disable : function() {
		this.disabled = true;
		if (this.tracker) {
			this.tracker.disable()
		}
	},
	enable : function() {
		this.disabled = false;
		if (this.tracker) {
			this.tracker.enable()
		}
	}
});
Ext.define("Ext.data.Batch", {
			mixins : {
				observable : "Ext.util.Observable"
			},
			autoStart : false,
			current : -1,
			total : 0,
			isRunning : false,
			isComplete : false,
			hasException : false,
			pauseOnException : true,
			constructor : function(a) {
				var b = this;
				b.addEvents("complete", "exception", "operationcomplete");
				b.mixins.observable.constructor.call(b, a);
				b.operations = []
			},
			add : function(a) {
				this.total++;
				a.setBatch(this);
				this.operations.push(a)
			},
			start : function() {
				this.hasException = false;
				this.isRunning = true;
				this.runNextOperation()
			},
			runNextOperation : function() {
				this.runOperation(this.current + 1)
			},
			pause : function() {
				this.isRunning = false
			},
			runOperation : function(d) {
				var e = this, c = e.operations, b = c[d], a;
				if (b === undefined) {
					e.isRunning = false;
					e.isComplete = true;
					e.fireEvent("complete", e, c[c.length - 1])
				} else {
					e.current = d;
					a = function(f) {
						var g = f.hasException();
						if (g) {
							e.hasException = true;
							e.fireEvent("exception", e, f)
						} else {
							e.fireEvent("operationcomplete", e, f)
						}
						if (g && e.pauseOnException) {
							e.pause()
						} else {
							f.setCompleted();
							e.runNextOperation()
						}
					};
					b.setStarted();
					e.proxy[b.action](b, a, e)
				}
			}
		});
Ext.define("Ext.data.Request", {
			action : undefined,
			params : undefined,
			method : "GET",
			url : undefined,
			constructor : function(a) {
				Ext.apply(this, a)
			}
		});
Ext.define("Ext.data.reader.Array", {
			extend : "Ext.data.reader.Json",
			alternateClassName : "Ext.data.ArrayReader",
			alias : "reader.array",
			buildExtractors : function() {
				this.callParent(arguments);
				var a = this.model.prototype.fields.items, c = a.length, d = [], b;
				for (b = 0; b < c; b++) {
					d.push(function(e) {
								return function(f) {
									return f[e]
								}
							}(a[b].mapping || b))
				}
				this.extractorFunctions = d
			}
		});
Ext.define("Ext.view.TableChunker", {
	singleton : true,
	requires : ["Ext.XTemplate"],
	metaTableTpl : [
			"{[this.openTableWrap()]}",
			'<table class="'
					+ Ext.baseCSSPrefix
					+ "grid-table "
					+ Ext.baseCSSPrefix
					+ 'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth()]}>',
			"<tbody>",
			"<tr>",
			'<tpl for="columns">',
			'<th class="'
					+ Ext.baseCSSPrefix
					+ 'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',
			"</tpl>", "</tr>", "{[this.openRows()]}", "{row}",
			'<tpl for="features">',
			"{[this.embedFeature(values, parent, xindex, xcount)]}", "</tpl>",
			"{[this.closeRows()]}", "</tbody>", "</table>",
			"{[this.closeTableWrap()]}"],
	constructor : function() {
		Ext.XTemplate.prototype.recurse = function(b, a) {
			return this.apply(a ? b[a] : b)
		}
	},
	embedFeature : function(b, d, a, e) {
		var c = "";
		if (!b.disabled) {
			c = b.getFeatureTpl(b, d, a, e)
		}
		return c
	},
	embedFullWidth : function() {
		return 'style="width: {fullWidth}px;"'
	},
	openRows : function() {
		return '<tpl for="rows">'
	},
	closeRows : function() {
		return "</tpl>"
	},
	metaRowTpl : [
			'<tr class="'
					+ Ext.baseCSSPrefix
					+ 'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>',
			'<tpl for="columns">',
			'<td class="{cls} '
					+ Ext.baseCSSPrefix
					+ "grid-cell "
					+ Ext.baseCSSPrefix
					+ 'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div unselectable="on" class="'
					+ Ext.baseCSSPrefix
					+ "grid-cell-inner "
					+ Ext.baseCSSPrefix
					+ 'unselectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',
			"</tpl>", "</tr>"],
	firstOrLastCls : function(b, c) {
		var a = "";
		if (b === 1) {
			a = Ext.baseCSSPrefix + "grid-cell-first"
		} else {
			if (b === c) {
				a = Ext.baseCSSPrefix + "grid-cell-last"
			}
		}
		return a
	},
	embedRowCls : function() {
		return "{rowCls}"
	},
	embedRowAttr : function() {
		return "{rowAttr}"
	},
	openTableWrap : function() {
		return ""
	},
	closeTableWrap : function() {
		return ""
	},
	getTableTpl : function(j, b) {
		var h, g = {
			openRows : this.openRows,
			closeRows : this.closeRows,
			embedFeature : this.embedFeature,
			embedFullWidth : this.embedFullWidth,
			openTableWrap : this.openTableWrap,
			closeTableWrap : this.closeTableWrap
		}, f = {}, c = j.features || [], l = c.length, e = 0, k = {
			embedRowCls : this.embedRowCls,
			embedRowAttr : this.embedRowAttr,
			firstOrLastCls : this.firstOrLastCls
		}, d = Array.prototype.slice.call(this.metaRowTpl, 0), a;
		for (; e < l; e++) {
			if (!c[e].disabled) {
				c[e].mutateMetaRowTpl(d);
				Ext.apply(k, c[e].getMetaRowTplFragments());
				Ext.apply(f, c[e].getFragmentTpl());
				Ext.apply(g, c[e].getTableFragments())
			}
		}
		d = Ext.create("Ext.XTemplate", d.join(""), k);
		j.row = d.applyTemplate(j);
		a = Ext.create("Ext.XTemplate", this.metaTableTpl.join(""), g);
		h = a.applyTemplate(j);
		if (!b) {
			h = Ext.create("Ext.XTemplate", h, f)
		}
		return h
	}
});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.Wallpaper", {
			extend : "Ext.Component",
			alias : "widget.wallpaper",
			cls : "ux-wallpaper",
			html : '<img src="' + Ext.BLANK_IMAGE_URL + '">',
			stretch : false,
			wallpaper : null,
			afterRender : function() {
				var a = this;
				a.callParent();
				a.setWallpaper(a.wallpaper, a.stretch)
			},
			applyState : function() {
				var b = this, a = b.wallpaper;
				b.callParent(arguments);
				if (a != b.wallpaper) {
					b.setWallpaper(b.wallpaper)
				}
			},
			getState : function() {
				return this.wallpaper && {
					wallpaper : this.wallpaper
				}
			},
			setWallpaper : function(b, a) {
				var c = this, e, d;
				c.stretch = (a !== false);
				c.wallpaper = b;
				if (c.rendered) {
					e = c.el.dom.firstChild;
					if (!b || b == Ext.BLANK_IMAGE_URL) {
						Ext.fly(e).hide()
					} else {
						if (c.stretch) {
							e.src = b;
							c.el.removeCls("ux-wallpaper-tiled");
							Ext.fly(e).setStyle({
										width : "100%",
										height : "100%"
									}).show()
						} else {
							Ext.fly(e).hide();
							d = "url(" + b + ")";
							c.el.addCls("ux-wallpaper-tiled")
						}
					}
					c.el.setStyle({
								backgroundImage : d || ""
							})
				}
				return c
			}
		});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.FitAllLayout", {
			extend : "Ext.layout.container.AbstractFit",
			alias : "layout.fitall",
			onLayout : function() {
				var b = this;
				b.callParent();
				var a = b.getLayoutTargetSize();
				b.owner.items.each(function(c) {
							b.setItemBox(c, a)
						})
			},
			getTargetBox : function() {
				return this.getLayoutTargetSize()
			},
			setItemBox : function(c, b) {
				var a = this;
				if (c && b.height > 0) {
					if (a.isManaged("width") === true) {
						b.width = undefined
					}
					if (a.isManaged("height") === true) {
						b.height = undefined
					}
					c.getEl().position("absolute", null, 0, 0);
					a.setItemSize(c, b.width, b.height)
				}
			}
		});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("MyDesktop.WallpaperModel", {
			extend : "Ext.data.Model",
			fields : [{
						name : "text"
					}, {
						name : "img"
					}]
		});
Ext.define("Ext.grid.Scroller", {
	extend : "Ext.Component",
	alias : "widget.gridscroller",
	weight : 110,
	cls : Ext.baseCSSPrefix + "scroller",
	focusable : false,
	renderTpl : ['<div class="' + Ext.baseCSSPrefix + 'stretcher"></div>'],
	initComponent : function() {
		var d = this, c = d.dock, a = Ext.baseCSSPrefix + "scroller-vertical", e = "width", b = Ext
				.getScrollBarWidth()
				+ (Ext.isIE ? 1 : -1);
		d.offsets = {
			bottom : 0
		};
		if (c === "top" || c === "bottom") {
			a = Ext.baseCSSPrefix + "scroller-horizontal";
			e = "height"
		}
		d[e] = b;
		d.cls += (" " + a);
		Ext.applyIf(d.renderSelectors, {
					stretchEl : "." + Ext.baseCSSPrefix + "stretcher"
				});
		d.callParent()
	},
	afterRender : function() {
		var a = this;
		a.callParent();
		a.ownerCt.on("afterlayout", a.onOwnerAfterLayout, a);
		a.mon(a.el, "scroll", a.onElScroll, a);
		Ext.cache[a.el.id].skipGarbageCollection = true
	},
	getSizeCalculation : function() {
		var c = this.getPanel(), i = this.dock, e = this.el.dom, b = 1, h = 1, g, d;
		if (i === "top" || i === "bottom") {
			var f = c.query("tableview"), a = f[1] || f[0];
			if (!a) {
				return false
			}
			b = a.headerCt.getFullWidth();
			if (Ext.isIEQuirks) {
				b--
			}
			b--
		} else {
			g = c.down("tableview:not([lockableInjected])");
			if (!g) {
				return false
			}
			d = g.el;
			if (!d) {
				return false
			}
			h = d.dom.scrollHeight
		}
		if (isNaN(b)) {
			b = 1
		}
		if (isNaN(h)) {
			h = 1
		}
		return {
			width : b,
			height : h
		}
	},
	invalidate : function(c) {
		if (!this.stretchEl || !this.ownerCt) {
			return
		}
		var b = this.getSizeCalculation(), a = this.el.dom;
		if (b) {
			this.stretchEl.setSize(b);
			a.scrollTop = a.scrollTop
		}
	},
	onOwnerAfterLayout : function(a, b) {
		this.invalidate()
	},
	setScrollTop : function(b) {
		if (this.el) {
			var a = this.el.dom;
			return a.scrollTop = Ext.Number.constrain(b, 0, a.scrollHeight
							- a.clientHeight)
		}
	},
	setScrollLeft : function(b) {
		if (this.el) {
			var a = this.el.dom;
			return a.scrollLeft = Ext.Number.constrain(b, 0, a.scrollWidth
							- a.clientWidth)
		}
	},
	scrollByDeltaY : function(b) {
		if (this.el) {
			var a = this.el.dom;
			return this.setScrollTop(a.scrollTop + b)
		}
	},
	scrollByDeltaX : function(b) {
		if (this.el) {
			var a = this.el.dom;
			return this.setScrollLeft(a.scrollLeft + b)
		}
	},
	scrollToTop : function() {
		this.setScrollTop(0)
	},
	onElScroll : function(a, b) {
		this.fireEvent("bodyscroll", a, b)
	},
	getPanel : function() {
		var a = this;
		if (!a.panel) {
			a.panel = this.up("[scrollerOwner]")
		}
		return a.panel
	}
});
Ext.define("Ext.menu.Item", {
	extend : "Ext.Component",
	alias : "widget.menuitem",
	alternateClassName : "Ext.menu.TextItem",
	activeCls : Ext.baseCSSPrefix + "menu-item-active",
	ariaRole : "menuitem",
	canActivate : true,
	clickHideDelay : 1,
	destroyMenu : true,
	disabledCls : Ext.baseCSSPrefix + "menu-item-disabled",
	hideOnClick : true,
	isMenuItem : true,
	menuAlign : "tl-tr?",
	menuExpandDelay : 200,
	menuHideDelay : 200,
	renderTpl : [
			'<tpl if="plain">',
			"{text}",
			"</tpl>",
			'<tpl if="!plain">',
			'<a class="'
					+ Ext.baseCSSPrefix
					+ 'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">',
			'<img src="{icon}" class="' + Ext.baseCSSPrefix
					+ 'menu-item-icon {iconCls}" />',
			'<span class="'
					+ Ext.baseCSSPrefix
					+ 'menu-item-text" <tpl if="menu">style="margin-right: 17px;"</tpl> >{text}</span>',
			'<tpl if="menu">',
			'<img src="' + Ext.BLANK_IMAGE_URL + '" class="'
					+ Ext.baseCSSPrefix + 'menu-item-arrow" />', "</tpl>",
			"</a>", "</tpl>"],
	maskOnDisable : false,
	activate : function() {
		var a = this;
		if (!a.activated && a.canActivate && a.rendered && !a.isDisabled()
				&& a.isVisible()) {
			a.el.addCls(a.activeCls);
			a.focus();
			a.activated = true;
			a.fireEvent("activate", a)
		}
	},
	blur : function() {
		this.$focused = false;
		this.callParent(arguments)
	},
	deactivate : function() {
		var a = this;
		if (a.activated) {
			a.el.removeCls(a.activeCls);
			a.blur();
			a.hideMenu();
			a.activated = false;
			a.fireEvent("deactivate", a)
		}
	},
	deferExpandMenu : function() {
		var a = this;
		if (!a.menu.rendered || !a.menu.isVisible()) {
			a.parentMenu.activeChild = a.menu;
			a.menu.parentItem = a;
			a.menu.parentMenu = a.menu.ownerCt = a.parentMenu;
			a.menu.showBy(a, a.menuAlign)
		}
	},
	deferHideMenu : function() {
		if (this.menu.isVisible()) {
			this.menu.hide()
		}
	},
	deferHideParentMenus : function() {
		Ext.menu.Manager.hideAll()
	},
	expandMenu : function(a) {
		var b = this;
		if (b.menu) {
			clearTimeout(b.hideMenuTimer);
			if (a === 0) {
				b.deferExpandMenu()
			} else {
				b.expandMenuTimer = Ext.defer(b.deferExpandMenu, Ext
								.isNumber(a) ? a : b.menuExpandDelay, b)
			}
		}
	},
	focus : function() {
		this.$focused = true;
		this.callParent(arguments)
	},
	getRefItems : function(a) {
		var c = this.menu, b;
		if (c) {
			b = c.getRefItems(a);
			b.unshift(c)
		}
		return b || []
	},
	hideMenu : function(a) {
		var b = this;
		if (b.menu) {
			clearTimeout(b.expandMenuTimer);
			b.hideMenuTimer = Ext.defer(b.deferHideMenu, Ext.isNumber(a)
							? a
							: b.menuHideDelay, b)
		}
	},
	initComponent : function() {
		var b = this, c = Ext.baseCSSPrefix, a = [c + "menu-item"];
		b.addEvents("activate", "click", "deactivate");
		if (b.plain) {
			a.push(c + "menu-item-plain")
		}
		if (b.cls) {
			a.push(b.cls)
		}
		b.cls = a.join(" ");
		if (b.menu) {
			b.menu = Ext.menu.Manager.get(b.menu)
		}
		b.callParent(arguments)
	},
	onClick : function(b) {
		var a = this;
		if (!a.href) {
			b.stopEvent()
		}
		if (a.disabled) {
			return
		}
		if (a.hideOnClick) {
			a.deferHideParentMenusTimer = Ext.defer(a.deferHideParentMenus,
					a.clickHideDelay, a)
		}
		Ext.callback(a.handler, a.scope || a, [a, b]);
		a.fireEvent("click", a, b);
		if (!a.hideOnClick) {
			a.focus()
		}
	},
	onDestroy : function() {
		var a = this;
		clearTimeout(a.expandMenuTimer);
		clearTimeout(a.hideMenuTimer);
		clearTimeout(a.deferHideParentMenusTimer);
		if (a.menu) {
			delete a.menu.parentItem;
			delete a.menu.parentMenu;
			delete a.menu.ownerCt;
			if (a.destroyMenu !== false) {
				a.menu.destroy()
			}
		}
		a.callParent(arguments)
	},
	onRender : function(a, d) {
		var b = this, c = "." + Ext.baseCSSPrefix;
		Ext.applyIf(b.renderData, {
					href : b.href || "#",
					hrefTarget : b.hrefTarget,
					icon : b.icon || Ext.BLANK_IMAGE_URL,
					iconCls : b.iconCls,
					menu : Ext.isDefined(b.menu),
					plain : b.plain,
					text : b.text
				});
		Ext.applyIf(b.renderSelectors, {
					itemEl : c + "menu-item-link",
					iconEl : c + "menu-item-icon",
					textEl : c + "menu-item-text",
					arrowEl : c + "menu-item-arrow"
				});
		b.callParent(arguments)
	},
	setHandler : function(b, a) {
		this.handler = b || null;
		this.scope = a
	},
	setIconCls : function(a) {
		var b = this;
		if (b.iconEl) {
			if (b.iconCls) {
				b.iconEl.removeCls(b.iconCls)
			}
			if (a) {
				b.iconEl.addCls(a)
			}
		}
		b.iconCls = a
	},
	setText : function(d) {
		var c = this, a = c.textEl || c.el, b;
		if (d && a) {
			a.update(d);
			if (c.textEl) {
				b = c.textEl.getWidth() + c.iconEl.getWidth() + 25
						+ (c.arrowEl ? c.arrowEl.getWidth() : 0);
				if (b > c.itemEl.getWidth()) {
					c.parentMenu.setWidth(b)
				}
			}
		} else {
			if (a) {
				a.update("")
			}
		}
		c.text = d
	}
});
Ext.define("Ext.menu.KeyNav", {
			extend : "Ext.util.KeyNav",
			requires : ["Ext.FocusManager"],
			constructor : function(b) {
				var a = this;
				a.menu = b;
				a.callParent([b.el, {
							down : a.down,
							enter : a.enter,
							esc : a.escape,
							left : a.left,
							right : a.right,
							space : a.enter,
							tab : a.tab,
							up : a.up
						}])
			},
			down : function(b) {
				var a = this, c = a.menu.focusedItem;
				if (c && b.getKey() == Ext.EventObject.DOWN
						&& a.isWhitelisted(c)) {
					return true
				}
				a.focusNextItem(1)
			},
			enter : function(a) {
				var b = this.menu;
				if (b.activeItem) {
					b.onClick(a)
				}
			},
			escape : function(a) {
				Ext.menu.Manager.hideAll()
			},
			focusNextItem : function(f) {
				var g = this.menu, b = g.items, d = g.focusedItem, c = d ? b
						.indexOf(d) : -1, a = c + f;
				while (a != c) {
					if (a < 0) {
						a = b.length - 1
					} else {
						if (a >= b.length) {
							a = 0
						}
					}
					var e = b.getAt(a);
					if (g.canActivateItem(e)) {
						g.setActiveItem(e);
						break
					}
					a += f
				}
			},
			isWhitelisted : function(a) {
				return Ext.FocusManager.isWhitelisted(a)
			},
			left : function(b) {
				var c = this.menu, d = c.focusedItem, a = c.activeItem;
				if (d && this.isWhitelisted(d)) {
					return true
				}
				c.hide();
				if (c.parentMenu) {
					c.parentMenu.focus()
				}
			},
			right : function(c) {
				var d = this.menu, f = d.focusedItem, a = d.activeItem, b;
				if (f && this.isWhitelisted(f)) {
					return true
				}
				if (a) {
					b = d.activeItem.menu;
					if (b) {
						a.expandMenu(0);
						Ext.defer(function() {
									b.setActiveItem(b.items.getAt(0))
								}, 25)
					}
				}
			},
			tab : function(b) {
				var a = this;
				if (b.shiftKey) {
					a.up(b)
				} else {
					a.down(b)
				}
			},
			up : function(b) {
				var a = this, c = a.menu.focusedItem;
				if (c && b.getKey() == Ext.EventObject.UP && a.isWhitelisted(c)) {
					return true
				}
				a.focusNextItem(-1)
			}
		});
Ext.define("Ext.draw.Matrix", {
	requires : ["Ext.draw.Draw"],
	constructor : function(h, g, l, k, j, i) {
		if (h != null) {
			this.matrix = [[h, l, j], [g, k, i], [0, 0, 1]]
		} else {
			this.matrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
		}
	},
	add : function(s, p, m, k, i, h) {
		var n = this, g = [[], [], []], r = [[s, m, i], [p, k, h], [0, 0, 1]], q, o, l, j;
		for (q = 0; q < 3; q++) {
			for (o = 0; o < 3; o++) {
				j = 0;
				for (l = 0; l < 3; l++) {
					j += n.matrix[q][l] * r[l][o]
				}
				g[q][o] = j
			}
		}
		n.matrix = g
	},
	prepend : function(s, p, m, k, i, h) {
		var n = this, g = [[], [], []], r = [[s, m, i], [p, k, h], [0, 0, 1]], q, o, l, j;
		for (q = 0; q < 3; q++) {
			for (o = 0; o < 3; o++) {
				j = 0;
				for (l = 0; l < 3; l++) {
					j += r[q][l] * n.matrix[l][o]
				}
				g[q][o] = j
			}
		}
		n.matrix = g
	},
	invert : function() {
		var j = this.matrix, i = j[0][0], h = j[1][0], n = j[0][1], m = j[1][1], l = j[0][2], k = j[1][2], g = i
				* m - h * n;
		return new Ext.draw.Matrix(m / g, -h / g, -n / g, i / g,
				(n * k - m * l) / g, (h * l - i * k) / g)
	},
	clone : function() {
		var i = this.matrix, h = i[0][0], g = i[1][0], m = i[0][1], l = i[1][1], k = i[0][2], j = i[1][2];
		return new Ext.draw.Matrix(h, g, m, l, k, j)
	},
	translate : function(a, b) {
		this.prepend(1, 0, 0, 1, a, b)
	},
	scale : function(b, e, a, d) {
		var c = this;
		if (e == null) {
			e = b
		}
		c.add(1, 0, 0, 1, a, d);
		c.add(b, 0, 0, e, 0, 0);
		c.add(1, 0, 0, 1, -a, -d)
	},
	rotate : function(c, b, g) {
		c = Ext.draw.Draw.rad(c);
		var e = this, f = +Math.cos(c).toFixed(9), d = +Math.sin(c).toFixed(9);
		e.add(f, d, -d, f, b, g);
		e.add(1, 0, 0, 1, -b, -g)
	},
	x : function(a, c) {
		var b = this.matrix;
		return a * b[0][0] + c * b[0][1] + b[0][2]
	},
	y : function(a, c) {
		var b = this.matrix;
		return a * b[1][0] + c * b[1][1] + b[1][2]
	},
	get : function(b, a) {
		return +this.matrix[b][a].toFixed(4)
	},
	toString : function() {
		var a = this;
		return [a.get(0, 0), a.get(0, 1), a.get(1, 0), a.get(1, 1), 0, 0]
				.join()
	},
	toSvg : function() {
		var a = this;
		return "matrix("
				+ [a.get(0, 0), a.get(1, 0), a.get(0, 1), a.get(1, 1),
						a.get(0, 2), a.get(1, 2)].join() + ")"
	},
	toFilter : function() {
		var a = this;
		return "progid:DXImageTransform.Microsoft.Matrix(M11=" + a.get(0, 0)
				+ ", M12=" + a.get(0, 1) + ", M21=" + a.get(1, 0) + ", M22="
				+ a.get(1, 1) + ", Dx=" + a.get(0, 2) + ", Dy=" + a.get(1, 2)
				+ ")"
	},
	offset : function() {
		var a = this.matrix;
		return [a[0][2].toFixed(4), a[1][2].toFixed(4)]
	},
	split : function() {
		function d(f) {
			return f[0] * f[0] + f[1] * f[1]
		}
		function b(f) {
			var g = Math.sqrt(d(f));
			f[0] /= g;
			f[1] /= g
		}
		var a = this.matrix, c = {
			translateX : a[0][2],
			translateY : a[1][2]
		}, e;
		e = [[a[0][0], a[0][1]], [a[1][1], a[1][1]]];
		c.scaleX = Math.sqrt(d(e[0]));
		b(e[0]);
		c.shear = e[0][0] * e[1][0] + e[0][1] * e[1][1];
		e[1] = [e[1][0] - e[0][0] * c.shear, e[1][1] - e[0][1] * c.shear];
		c.scaleY = Math.sqrt(d(e[1]));
		b(e[1]);
		c.shear /= c.scaleY;
		c.rotate = Math.asin(-e[0][1]);
		c.isSimple = !+c.shear.toFixed(9)
				&& (c.scaleX.toFixed(9) == c.scaleY.toFixed(9) || !c.rotate);
		return c
	}
});
Ext.define("Ext.data.proxy.Client", {
			extend : "Ext.data.proxy.Proxy",
			alternateClassName : "Ext.data.ClientProxy",
			clear : function() {
			}
		});
Ext.define("Ext.resizer.Splitter", {
	extend : "Ext.Component",
	requires : ["Ext.XTemplate"],
	uses : ["Ext.resizer.SplitterTracker"],
	alias : "widget.splitter",
	renderTpl : ['<tpl if="collapsible===true"><div class="'
			+ Ext.baseCSSPrefix + "collapse-el " + Ext.baseCSSPrefix
			+ 'layout-split-{collapseDir}">&nbsp;</div></tpl>'],
	baseCls : Ext.baseCSSPrefix + "splitter",
	collapsedCls : Ext.baseCSSPrefix + "splitter-collapsed",
	collapsible : false,
	collapseOnDblClick : true,
	defaultSplitMin : 40,
	defaultSplitMax : 1000,
	width : 5,
	height : 5,
	collapseTarget : "next",
	onRender : function() {
		var a = this, b = a.getCollapseTarget(), c = a.getCollapseDirection();
		Ext.applyIf(a.renderData, {
					collapseDir : c,
					collapsible : a.collapsible || b.collapsible
				});
		Ext.applyIf(a.renderSelectors, {
					collapseEl : "." + Ext.baseCSSPrefix + "collapse-el"
				});
		this.callParent(arguments);
		if (a.performCollapse !== false) {
			if (a.renderData.collapsible) {
				a.mon(a.collapseEl, "click", a.toggleTargetCmp, a)
			}
			if (a.collapseOnDblClick) {
				a.mon(a.el, "dblclick", a.toggleTargetCmp, a)
			}
		}
		a.mon(b, "collapse", a.onTargetCollapse, a);
		a.mon(b, "expand", a.onTargetExpand, a);
		a.el.addCls(a.baseCls + "-" + a.orientation);
		a.el.unselectable();
		a.tracker = Ext.create("Ext.resizer.SplitterTracker", {
					el : a.el
				})
	},
	getCollapseDirection : function() {
		var c = this, a, b = c.ownerCt.layout.type;
		if (c.collapseTarget.isComponent) {
			a = Number(c.ownerCt.items.indexOf(c.collapseTarget) == c.ownerCt.items
					.indexOf(c)
					- 1) << 1
					| Number(b == "hbox")
		} else {
			a = Number(c.collapseTarget == "prev") << 1 | Number(b == "hbox")
		}
		c.orientation = ["horizontal", "vertical"][a & 1];
		return ["bottom", "right", "top", "left"][a]
	},
	getCollapseTarget : function() {
		return this.collapseTarget.isComponent
				? this.collapseTarget
				: this.collapseTarget == "prev" ? this.previousSibling() : this
						.nextSibling()
	},
	onTargetCollapse : function(a) {
		this.el.addCls(this.collapsedCls)
	},
	onTargetExpand : function(a) {
		this.el.removeCls(this.collapsedCls)
	},
	toggleTargetCmp : function(c, a) {
		var b = this.getCollapseTarget();
		if (b.isVisible()) {
			if (b.collapsed) {
				b.expand(b.animCollapse)
			} else {
				b.collapse(this.renderData.collapseDir, b.animCollapse)
			}
		}
	},
	setSize : function() {
		var a = this;
		a.callParent(arguments);
		if (Ext.isIE) {
			a.el.repaint()
		}
	}
});
Ext.define("Ext.toolbar.TextItem", {
			extend : "Ext.toolbar.Item",
			requires : ["Ext.XTemplate"],
			alias : "widget.tbtext",
			alternateClassName : "Ext.Toolbar.TextItem",
			text : "",
			renderTpl : "{text}",
			baseCls : Ext.baseCSSPrefix + "toolbar-text",
			onRender : function() {
				Ext.apply(this.renderData, {
							text : this.text
						});
				this.callParent(arguments)
			},
			setText : function(a) {
				if (this.rendered) {
					this.el.update(a);
					this.ownerCt.doLayout()
				} else {
					this.text = a
				}
			}
		});
Ext.define("Ext.form.CheckboxManager", {
			extend : "Ext.util.MixedCollection",
			singleton : true,
			getByName : function(a) {
				return this.filterBy(function(b) {
							return b.name == a
						})
			},
			getWithValue : function(a, b) {
				return this.filterBy(function(c) {
							return c.name == a && c.inputValue == b
						})
			},
			getChecked : function(a) {
				return this.filterBy(function(b) {
							return b.name == a && b.checked
						})
			}
		});
Ext.define("Ext.grid.LockingView", {
	mixins : {
		observable : "Ext.util.Observable"
	},
	eventRelayRe : /^(beforeitem|beforecontainer|item|container|cell)/,
	constructor : function(c) {
		var f = this, h = [], a = f.eventRelayRe, b = c.locked.getView(), g = c.normal
				.getView(), d, e;
		Ext.apply(f, {
					lockedView : b,
					normalView : g,
					lockedGrid : c.locked,
					normalGrid : c.normal,
					panel : c.panel
				});
		f.mixins.observable.constructor.call(f, c);
		d = b.events;
		for (e in d) {
			if (d.hasOwnProperty(e) && a.test(e)) {
				h.push(e)
			}
		}
		f.relayEvents(b, h);
		f.relayEvents(g, h);
		g.on({
					scope : f,
					itemmouseleave : f.onItemMouseLeave,
					itemmouseenter : f.onItemMouseEnter
				});
		b.on({
					scope : f,
					itemmouseleave : f.onItemMouseLeave,
					itemmouseenter : f.onItemMouseEnter
				})
	},
	getGridColumns : function() {
		var a = this.lockedGrid.headerCt.getGridColumns();
		return a.concat(this.normalGrid.headerCt.getGridColumns())
	},
	onItemMouseEnter : function(c, b) {
		var f = this, d = f.lockedView, a = f.normalView, e;
		if (c.trackOver) {
			if (c !== d) {
				a = d
			}
			e = a.getNode(b);
			a.highlightItem(e)
		}
	},
	onItemMouseLeave : function(c, b) {
		var e = this, d = e.lockedView, a = e.normalView;
		if (c.trackOver) {
			if (c !== d) {
				a = d
			}
			a.clearHighlight()
		}
	},
	relayFn : function(c, b) {
		b = b || [];
		var a = this.lockedView;
		a[c].apply(a, b || []);
		a = this.normalView;
		a[c].apply(a, b || [])
	},
	getSelectionModel : function() {
		return this.panel.getSelectionModel()
	},
	getStore : function() {
		return this.panel.store
	},
	getNode : function(a) {
		return this.normalView.getNode(a)
	},
	getCell : function(b, c) {
		var a = this.lockedView, d;
		if (a.getHeaderAtIndex(c) === -1) {
			a = this.normalView
		}
		d = a.getNode(b);
		return Ext.fly(d).down(c.getCellSelector())
	},
	getRecord : function(b) {
		var a = this.lockedView.getRecord(b);
		if (!b) {
			a = this.normalView.getRecord(b)
		}
		return a
	},
	refreshNode : function() {
		this.relayFn("refreshNode", arguments)
	},
	refresh : function() {
		this.relayFn("refresh", arguments)
	},
	bindStore : function() {
		this.relayFn("bindStore", arguments)
	},
	addRowCls : function() {
		this.relayFn("addRowCls", arguments)
	},
	removeRowCls : function() {
		this.relayFn("removeRowCls", arguments)
	}
});
Ext.define("Ext.draw.SpriteDD", {
			extend : "Ext.dd.DragSource",
			constructor : function(b, a) {
				var d = this, c = b.el;
				d.sprite = b;
				d.el = c;
				d.dragData = {
					el : c,
					sprite : b
				};
				d.callParent([c, a]);
				d.sprite.setStyle("cursor", "move")
			},
			showFrame : Ext.emptyFn,
			createFrame : Ext.emptyFn,
			getDragEl : function(a) {
				return this.el
			},
			getRegion : function() {
				var i = this, f = i.el, k, d, c, n, m, q, a, j, g, p, o;
				o = i.sprite;
				p = o.getBBox();
				try {
					k = Ext.core.Element.getXY(f)
				} catch (h) {
				}
				if (!k) {
					return null
				}
				d = k[0];
				c = d + p.width;
				n = k[1];
				m = n + p.height;
				return Ext.create("Ext.util.Region", n, c, m, d)
			},
			startDrag : function(b, e) {
				var d = this, a = d.sprite.attr, c = a.translation;
				if (d.sprite.vml) {
					d.prevX = b + a.x;
					d.prevY = e + a.y
				} else {
					d.prevX = b - c.x;
					d.prevY = e - c.y
				}
			},
			onDrag : function(f) {
				var d = f.getXY(), c = this, b = c.sprite, a = b.attr;
				c.translateX = d[0] - c.prevX;
				c.translateY = d[1] - c.prevY;
				b.setAttributes({
							translate : {
								x : c.translateX,
								y : c.translateY
							}
						}, true);
				if (b.vml) {
					c.prevX = d[0] + a.x || 0;
					c.prevY = d[1] + a.y || 0
				}
			}
		});
Ext.define("Ext.dd.DragZone", {
			extend : "Ext.dd.DragSource",
			constructor : function(b, a) {
				this.callParent([b, a]);
				if (this.containerScroll) {
					Ext.dd.ScrollManager.register(this.el)
				}
			},
			getDragData : function(a) {
				return Ext.dd.Registry.getHandleFromEvent(a)
			},
			onInitDrag : function(a, b) {
				this.proxy.update(this.dragData.ddel.cloneNode(true));
				this.onStartDrag(a, b);
				return true
			},
			afterRepair : function() {
				var a = this;
				if (Ext.enableFx) {
					Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)
				}
				a.dragging = false
			},
			getRepairXY : function(a) {
				return Ext.core.Element.fly(this.dragData.ddel).getXY()
			},
			destroy : function() {
				this.callParent();
				if (this.containerScroll) {
					Ext.dd.ScrollManager.unregister(this.el)
				}
			}
		});
Ext.define("Ext.dd.Registry", {
			singleton : true,
			constructor : function() {
				this.elements = {};
				this.handles = {};
				this.autoIdSeed = 0
			},
			getId : function(b, a) {
				if (typeof b == "string") {
					return b
				}
				var c = b.id;
				if (!c && a !== false) {
					c = "extdd-" + (++this.autoIdSeed);
					b.id = c
				}
				return c
			},
			register : function(d, e) {
				e = e || {};
				if (typeof d == "string") {
					d = document.getElementById(d)
				}
				e.ddel = d;
				this.elements[this.getId(d)] = e;
				if (e.isHandle !== false) {
					this.handles[e.ddel.id] = e
				}
				if (e.handles) {
					var c = e.handles;
					for (var b = 0, a = c.length; b < a; b++) {
						this.handles[this.getId(c[b])] = e
					}
				}
			},
			unregister : function(d) {
				var f = this.getId(d, false);
				var e = this.elements[f];
				if (e) {
					delete this.elements[f];
					if (e.handles) {
						var c = e.handles;
						for (var b = 0, a = c.length; b < a; b++) {
							delete this.handles[this.getId(c[b], false)]
						}
					}
				}
			},
			getHandle : function(a) {
				if (typeof a != "string") {
					a = a.id
				}
				return this.handles[a]
			},
			getHandleFromEvent : function(b) {
				var a = b.getTarget();
				return a ? this.handles[a.id] : null
			},
			getTarget : function(a) {
				if (typeof a != "string") {
					a = a.id
				}
				return this.elements[a]
			},
			getTargetFromEvent : function(b) {
				var a = b.getTarget();
				return a ? this.elements[a.id] || this.handles[a.id] : null
			}
		});
Ext.define("Ext.dd.DDTarget", {
			extend : "Ext.dd.DragDrop",
			constructor : function(c, a, b) {
				if (c) {
					this.initTarget(c, a, b)
				}
			},
			getDragEl : Ext.emptyFn,
			isValidHandleChild : Ext.emptyFn,
			startDrag : Ext.emptyFn,
			endDrag : Ext.emptyFn,
			onDrag : Ext.emptyFn,
			onDragDrop : Ext.emptyFn,
			onDragEnter : Ext.emptyFn,
			onDragOut : Ext.emptyFn,
			onDragOver : Ext.emptyFn,
			onInvalidDrop : Ext.emptyFn,
			onMouseDown : Ext.emptyFn,
			onMouseUp : Ext.emptyFn,
			setXConstraint : Ext.emptyFn,
			setYConstraint : Ext.emptyFn,
			resetConstraints : Ext.emptyFn,
			clearConstraints : Ext.emptyFn,
			clearTicks : Ext.emptyFn,
			setInitPosition : Ext.emptyFn,
			setDragElId : Ext.emptyFn,
			setHandleElId : Ext.emptyFn,
			setOuterHandleElId : Ext.emptyFn,
			addInvalidHandleClass : Ext.emptyFn,
			addInvalidHandleId : Ext.emptyFn,
			addInvalidHandleType : Ext.emptyFn,
			removeInvalidHandleClass : Ext.emptyFn,
			removeInvalidHandleId : Ext.emptyFn,
			removeInvalidHandleType : Ext.emptyFn,
			toString : function() {
				return ("DDTarget " + this.id)
			}
		});
Ext.define("Ext.dd.ScrollManager", {
	singleton : true,
	requires : ["Ext.dd.DragDropManager"],
	constructor : function() {
		var a = Ext.dd.DragDropManager;
		a.fireEvents = Ext.Function.createSequence(a.fireEvents, this.onFire,
				this);
		a.stopDrag = Ext.Function.createSequence(a.stopDrag, this.onStop, this);
		this.doScroll = Ext.Function.bind(this.doScroll, this);
		this.ddmInstance = a;
		this.els = {};
		this.dragEl = null;
		this.proc = {}
	},
	onStop : function(a) {
		var b = Ext.dd.ScrollManager;
		b.dragEl = null;
		b.clearProc()
	},
	triggerRefresh : function() {
		if (this.ddmInstance.dragCurrent) {
			this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)
		}
	},
	doScroll : function() {
		if (this.ddmInstance.dragCurrent) {
			var a = this.proc, b = a.el, c = a.el.ddScrollConfig, d = c
					? c.increment
					: this.increment;
			if (!this.animate) {
				if (b.scroll(a.dir, d)) {
					this.triggerRefresh()
				}
			} else {
				b
						.scroll(a.dir, d, true, this.animDuration,
								this.triggerRefresh)
			}
		}
	},
	clearProc : function() {
		var a = this.proc;
		if (a.id) {
			clearInterval(a.id)
		}
		a.id = 0;
		a.el = null;
		a.dir = ""
	},
	startProc : function(b, a) {
		this.clearProc();
		this.proc.el = b;
		this.proc.dir = a;
		var d = b.ddScrollConfig ? b.ddScrollConfig.ddGroup : undefined, c = (b.ddScrollConfig && b.ddScrollConfig.frequency)
				? b.ddScrollConfig.frequency
				: this.frequency;
		if (d === undefined || this.ddmInstance.dragCurrent.ddGroup == d) {
			this.proc.id = setInterval(this.doScroll, c)
		}
	},
	onFire : function(g, j) {
		if (j || !this.ddmInstance.dragCurrent) {
			return
		}
		if (!this.dragEl || this.dragEl != this.ddmInstance.dragCurrent) {
			this.dragEl = this.ddmInstance.dragCurrent;
			this.refreshCache()
		}
		var k = g.getXY(), l = g.getPoint(), h = this.proc, f = this.els;
		for (var b in f) {
			var d = f[b], a = d._region;
			var i = d.ddScrollConfig ? d.ddScrollConfig : this;
			if (a && a.contains(l) && d.isScrollable()) {
				if (a.bottom - l.y <= i.vthresh) {
					if (h.el != d) {
						this.startProc(d, "down")
					}
					return
				} else {
					if (a.right - l.x <= i.hthresh) {
						if (h.el != d) {
							this.startProc(d, "left")
						}
						return
					} else {
						if (l.y - a.top <= i.vthresh) {
							if (h.el != d) {
								this.startProc(d, "up")
							}
							return
						} else {
							if (l.x - a.left <= i.hthresh) {
								if (h.el != d) {
									this.startProc(d, "right")
								}
								return
							}
						}
					}
				}
			}
		}
		this.clearProc()
	},
	register : function(c) {
		if (Ext.isArray(c)) {
			for (var b = 0, a = c.length; b < a; b++) {
				this.register(c[b])
			}
		} else {
			c = Ext.get(c);
			this.els[c.id] = c
		}
	},
	unregister : function(c) {
		if (Ext.isArray(c)) {
			for (var b = 0, a = c.length; b < a; b++) {
				this.unregister(c[b])
			}
		} else {
			c = Ext.get(c);
			delete this.els[c.id]
		}
	},
	vthresh : 25,
	hthresh : 25,
	increment : 100,
	frequency : 500,
	animate : true,
	animDuration : 0.4,
	ddGroup : undefined,
	refreshCache : function() {
		var a = this.els, b;
		for (b in a) {
			if (typeof a[b] == "object") {
				a[b]._region = a[b].getRegion()
			}
		}
	}
});
Ext.define("Ext.menu.CheckItem", {
			extend : "Ext.menu.Item",
			alias : "widget.menucheckitem",
			checkedCls : Ext.baseCSSPrefix + "menu-item-checked",
			uncheckedCls : Ext.baseCSSPrefix + "menu-item-unchecked",
			groupCls : Ext.baseCSSPrefix + "menu-group-icon",
			hideOnClick : false,
			afterRender : function() {
				var a = this;
				this.callParent();
				a.checked = !a.checked;
				a.setChecked(!a.checked, true)
			},
			initComponent : function() {
				var a = this;
				a.addEvents("beforecheckchange", "checkchange");
				a.callParent(arguments);
				Ext.menu.Manager.registerCheckable(a);
				if (a.group) {
					if (!a.iconCls) {
						a.iconCls = a.groupCls
					}
					if (a.initialConfig.hideOnClick !== false) {
						a.hideOnClick = true
					}
				}
			},
			disableCheckChange : function() {
				var a = this;
				a.iconEl.addCls(a.disabledCls);
				a.checkChangeDisabled = true
			},
			enableCheckChange : function() {
				var a = this;
				a.iconEl.removeCls(a.disabledCls);
				a.checkChangeDisabled = false
			},
			onClick : function(b) {
				var a = this;
				if (!a.disabled && !a.checkChangeDisabled
						&& !(a.checked && a.group)) {
					a.setChecked(!a.checked)
				}
				this.callParent([b])
			},
			onDestroy : function() {
				Ext.menu.Manager.unregisterCheckable(this);
				this.callParent(arguments)
			},
			setChecked : function(c, a) {
				var b = this;
				if (b.checked !== c
						&& (a || b.fireEvent("beforecheckchange", b, c) !== false)) {
					if (b.el) {
						b.el[c ? "addCls" : "removeCls"](b.checkedCls)[!c
								? "addCls"
								: "removeCls"](b.uncheckedCls)
					}
					b.checked = c;
					Ext.menu.Manager.onCheckChange(b, c);
					if (!a) {
						Ext.callback(b.checkHandler, b.scope, [b, c]);
						b.fireEvent("checkchange", b, c)
					}
				}
			}
		});
Ext.define("Ext.menu.Separator", {
			extend : "Ext.menu.Item",
			alias : "widget.menuseparator",
			canActivate : false,
			focusable : false,
			hideOnClick : false,
			plain : true,
			separatorCls : Ext.baseCSSPrefix + "menu-item-separator",
			text : "&#160;",
			onRender : function(b, d) {
				var c = this, a = c.separatorCls;
				c.cls += " " + a;
				Ext.applyIf(c.renderSelectors, {
							itemSepEl : "." + a
						});
				c.callParent(arguments)
			}
		});
Ext.define("Ext.menu.Menu", {
	extend : "Ext.panel.Panel",
	alias : "widget.menu",
	requires : ["Ext.layout.container.Fit", "Ext.layout.container.VBox",
			"Ext.menu.CheckItem", "Ext.menu.Item", "Ext.menu.KeyNav",
			"Ext.menu.Manager", "Ext.menu.Separator"],
	allowOtherMenus : false,
	ariaRole : "menu",
	defaultAlign : "tl-bl?",
	floating : true,
	constrain : false,
	hidden : true,
	ignoreParentClicks : false,
	isMenu : true,
	showSeparator : true,
	minWidth : 120,
	initComponent : function() {
		var b = this, d = Ext.baseCSSPrefix;
		b.addEvents("click", "mouseenter", "mouseleave", "mouseover");
		Ext.menu.Manager.register(b);
		var a = [d + "menu"];
		if (b.plain) {
			a.push(d + "menu-plain")
		}
		b.cls = a.join(" ");
		var c = b.bodyCls ? [b.bodyCls] : [];
		c.unshift(d + "menu-body");
		b.bodyCls = c.join(" ");
		b.layout = {
			type : "vbox",
			align : "stretchmax",
			autoSize : true,
			clearInnerCtOnLayout : true,
			overflowHandler : "Scroller"
		};
		if (b.floating === false && b.initialConfig.hidden !== true) {
			b.hidden = false
		}
		b.callParent(arguments);
		b.on("beforeshow", function() {
					var e = !!b.items.length;
					if (e && b.rendered) {
						b.el.setStyle("visibility", null)
					}
					return e
				})
	},
	afterRender : function(a) {
		var b = this, d = Ext.baseCSSPrefix, c = "&#160;";
		b.callParent(arguments);
		if (b.showSeparator) {
			b.iconSepEl = b.layout.getRenderTarget().insertFirst({
						cls : d + "menu-icon-separator",
						html : c
					})
		}
		b.focusEl = b.el.createChild({
					cls : d + "menu-focus",
					tabIndex : "-1",
					html : c
				});
		b.mon(b.el, {
					click : b.onClick,
					mouseover : b.onMouseOver,
					scope : b
				});
		b.mouseMonitor = b.el.monitorMouseLeave(100, b.onMouseLeave, b);
		if (b.showSeparator && ((!Ext.isStrict && Ext.isIE) || Ext.isIE6)) {
			b.iconSepEl.setHeight(b.el.getHeight())
		}
		b.keyNav = Ext.create("Ext.menu.KeyNav", b)
	},
	afterLayout : function() {
		var j = this;
		j.callParent(arguments);
		if ((!Ext.iStrict && Ext.isIE) || Ext.isIE6) {
			var a = j.layout.getRenderTarget(), c = 0, b = j.dockedItems, d = b.length, f = 0, g, h, e;
			c = a.getWidth();
			e = c + j.body.getBorderWidth("lr") + j.body.getPadding("lr");
			j.body.setWidth(e);
			for (; f < d, g = b.getAt(f); f++) {
				if (g.dock == "left" || g.dock == "right") {
					e += g.getWidth()
				}
			}
			j.el.setWidth(e)
		}
	},
	canActivateItem : function(a) {
		return a && !a.isDisabled() && a.isVisible()
				&& (a.canActivate || a.getXTypes().indexOf("menuitem") < 0)
	},
	deactivateActiveItem : function() {
		var a = this;
		if (a.activeItem) {
			a.activeItem.deactivate();
			if (!a.activeItem.activated) {
				delete a.activeItem
			}
		}
		if (a.focusedItem) {
			a.focusedItem.blur();
			if (!a.focusedItem.$focused) {
				delete a.focusedItem
			}
		}
	},
	getFocusEl : function() {
		return this.focusEl
	},
	hide : function() {
		this.deactivateActiveItem();
		this.callParent(arguments)
	},
	getItemFromEvent : function(a) {
		return this.getChildByElement(a.getTarget())
	},
	lookupComponent : function(b) {
		var a = this;
		if (Ext.isString(b)) {
			b = a.lookupItemFromString(b)
		} else {
			if (Ext.isObject(b)) {
				b = a.lookupItemFromObject(b)
			}
		}
		b.minWidth = b.minWidth || a.minWidth;
		return b
	},
	lookupItemFromObject : function(c) {
		var b = this, d = Ext.baseCSSPrefix;
		if (!c.isComponent) {
			if (!c.xtype) {
				c = Ext.create("Ext.menu."
								+ (Ext.isBoolean(c.checked) ? "Check" : "")
								+ "Item", c)
			} else {
				c = Ext.ComponentManager.create(c, c.xtype)
			}
		}
		if (c.isMenuItem) {
			c.parentMenu = b
		}
		if (!c.isMenuItem && !c.dock) {
			var a = [d + "menu-item", d + "menu-item-cmp"], e = Ext.Function.createInterceptor;
			c.focus = e(c.focus, function() {
						this.$focused = true
					}, c);
			c.blur = e(c.blur, function() {
						this.$focused = false
					}, c);
			if (!b.plain && (c.indent === true || c.iconCls === "no-icon")) {
				a.push(d + "menu-item-indent")
			}
			if (c.rendered) {
				c.el.addCls(a)
			} else {
				c.cls = (c.cls ? c.cls : "") + " " + a.join(" ")
			}
			c.isMenuItem = true
		}
		return c
	},
	lookupItemFromString : function(a) {
		return (a == "separator" || a == "-") ? Ext
				.createWidget("menuseparator") : Ext.createWidget("menuitem", {
					canActivate : false,
					hideOnClick : false,
					plain : true,
					text : a
				})
	},
	onClick : function(c) {
		var b = this, a;
		if (b.disabled) {
			c.stopEvent();
			return
		}
		if ((c.getTarget() == b.focusEl.dom)
				|| c.within(b.layout.getRenderTarget())) {
			a = b.getItemFromEvent(c) || b.activeItem;
			if (a) {
				if (a.getXTypes().indexOf("menuitem") >= 0) {
					if (!a.menu || !b.ignoreParentClicks) {
						a.onClick(c)
					} else {
						c.stopEvent()
					}
				}
			}
			b.fireEvent("click", b, a, c)
		}
	},
	onDestroy : function() {
		var a = this;
		Ext.menu.Manager.unregister(a);
		if (a.rendered) {
			a.el.un(a.mouseMonitor);
			a.keyNav.destroy();
			delete a.keyNav
		}
		a.callParent(arguments)
	},
	onMouseLeave : function(b) {
		var a = this;
		a.deactivateActiveItem();
		if (a.disabled) {
			return
		}
		a.fireEvent("mouseleave", a, b)
	},
	onMouseOver : function(d) {
		var c = this, f = d.getRelatedTarget(), a = !c.el.contains(f), b = c
				.getItemFromEvent(d);
		if (a && c.parentMenu) {
			c.parentMenu.setActiveItem(c.parentItem);
			c.parentMenu.mouseMonitor.mouseenter()
		}
		if (c.disabled) {
			return
		}
		if (b) {
			c.setActiveItem(b);
			if (b.activated && b.expandMenu) {
				b.expandMenu()
			}
		}
		if (a) {
			c.fireEvent("mouseenter", c, d)
		}
		c.fireEvent("mouseover", c, b, d)
	},
	setActiveItem : function(b) {
		var a = this;
		if (b && (b != a.activeItem && b != a.focusedItem)) {
			a.deactivateActiveItem();
			if (a.canActivateItem(b)) {
				if (b.activate) {
					b.activate();
					if (b.activated) {
						a.activeItem = b;
						a.focusedItem = b;
						a.focus()
					}
				} else {
					b.focus();
					a.focusedItem = b
				}
			}
			b.el.scrollIntoView(a.layout.getRenderTarget())
		}
	},
	showBy : function(c, f, e) {
		var b = this;
		if (b.floating && c) {
			b.layout.autoSize = true;
			b.show();
			c = c.el || c;
			var d = b.el.getAlignToXY(c, f || b.defaultAlign, e);
			if (b.floatParent) {
				var a = b.floatParent.getTargetEl().getViewRegion();
				d[0] -= a.x;
				d[1] -= a.y
			}
			b.showAt(d);
			b.doConstrain()
		}
		return b
	},
	doConstrain : function() {
		var e = this, f = this.el.getY(), g, d, h = f, i, c, a, b;
		delete e.height;
		e.setSize();
		d = e.getHeight();
		if (e.floating) {
			c = Ext.fly(e.el.dom.parentNode);
			a = c.getScroll().top;
			b = c.getViewSize().height;
			i = f - a;
			g = e.maxHeight ? e.maxHeight : b - i;
			if (d > b) {
				g = b;
				h = f - i
			} else {
				if (g < d) {
					h = f - (d - g);
					g = d
				}
			}
		} else {
			g = e.getHeight()
		}
		if (e.maxHeight) {
			g = Math.min(e.maxHeight, g)
		}
		if (d > g && g > 0) {
			e.layout.autoSize = false;
			e.setHeight(g);
			if (e.showSeparator) {
				e.iconSepEl
						.setHeight(e.layout.getRenderTarget().dom.scrollHeight)
			}
		}
		e.el.setY(h)
	}
});
Ext.define("Ext.data.proxy.Memory", {
			extend : "Ext.data.proxy.Client",
			alias : "proxy.memory",
			alternateClassName : "Ext.data.MemoryProxy",
			constructor : function(a) {
				this.callParent([a]);
				this.setReader(this.reader)
			},
			read : function(c, f, d) {
				var e = this, b = e.getReader(), a = b.read(e.data);
				Ext.apply(c, {
							resultSet : a
						});
				c.setCompleted();
				c.setSuccessful();
				Ext.callback(f, d || e, [c])
			},
			clear : Ext.emptyFn
		});
Ext.define("Ext.form.field.Checkbox", {
	extend : "Ext.form.field.Base",
	alias : ["widget.checkboxfield", "widget.checkbox"],
	alternateClassName : "Ext.form.Checkbox",
	requires : ["Ext.XTemplate", "Ext.form.CheckboxManager"],
	fieldSubTpl : [
			"<tpl if=\"boxLabel && boxLabelAlign == 'before'\">",
			'<label class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',
			"</tpl>",
			'<input type="button" id="{id}" ',
			'<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>',
			'class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',
			"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">",
			'<label class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',
			"</tpl>", {
				disableFormats : true,
				compiled : true
			}],
	isCheckbox : true,
	focusCls : Ext.baseCSSPrefix + "form-cb-focus",
	fieldBodyCls : Ext.baseCSSPrefix + "form-cb-wrap",
	checked : false,
	checkedCls : Ext.baseCSSPrefix + "form-cb-checked",
	boxLabelCls : Ext.baseCSSPrefix + "form-cb-label",
	boxLabelAlign : "after",
	inputValue : "on",
	checkChangeEvents : [],
	inputType : "checkbox",
	ariaRole : "checkbox",
	onRe : /^on$/i,
	initComponent : function() {
		this.callParent(arguments);
		this.getManager().add(this)
	},
	initValue : function() {
		var b = this, a = !!b.checked;
		b.originalValue = b.lastValue = a;
		b.setValue(a)
	},
	onRender : function(b, a) {
		var c = this;
		Ext.applyIf(c.renderSelectors, {
					boxLabelEl : "label." + c.boxLabelCls
				});
		Ext.applyIf(c.subTplData, {
					boxLabel : c.boxLabel,
					boxLabelCls : c.boxLabelCls,
					boxLabelAlign : c.boxLabelAlign
				});
		c.callParent(arguments)
	},
	initEvents : function() {
		var a = this;
		a.callParent();
		a.mon(a.inputEl, "click", a.onBoxClick, a)
	},
	onBoxClick : function(b) {
		var a = this;
		if (!a.disabled && !a.readOnly) {
			this.setValue(!this.checked)
		}
	},
	getRawValue : function() {
		return this.checked
	},
	getValue : function() {
		return this.checked
	},
	getSubmitValue : function() {
		return this.checked ? this.inputValue : (this.uncheckedValue || null)
	},
	getModelData : function() {
		return this.getSubmitData()
	},
	setRawValue : function(d) {
		var c = this, e = c.inputEl, a = c.inputValue, b = (d === true
				|| d === "true" || d === "1" || ((Ext.isString(d) && a)
				? d == a
				: c.onRe.test(d)));
		if (e) {
			e.dom.setAttribute("aria-checked", b);
			c[b ? "addCls" : "removeCls"](c.checkedCls)
		}
		c.checked = c.rawValue = b;
		return b
	},
	setValue : function(b) {
		var a = this;
		if (Ext.isArray(b)) {
			a.getManager().getByName(a.name).each(function(c) {
						c.setValue(Ext.Array.contains(b, c.inputValue))
					})
		} else {
			a.callParent(arguments)
		}
		return a
	},
	valueToRaw : function(a) {
		return a
	},
	onChange : function(b, a) {
		var d = this, c = d.handler;
		if (c) {
			c.call(d.scope || d, d, b)
		}
		d.callParent(arguments)
	},
	getManager : function() {
		return Ext.form.CheckboxManager
	},
	onEnable : function() {
		var a = this, b = a.inputEl;
		a.callParent();
		if (b) {
			b.dom.disabled = a.readOnly
		}
	},
	setReadOnly : function(c) {
		var a = this, b = a.inputEl;
		if (b) {
			b.dom.disabled = c || a.disabled
		}
		a.readOnly = c
	},
	getBodyNaturalWidth : function() {
		var d = this, b = d.bodyEl, a = "white-space", c;
		b.setStyle(a, "nowrap");
		c = b.getWidth();
		b.setStyle(a, "");
		return c
	}
});
Ext.define("Ext.layout.container.Border", {
	alias : ["layout.border"],
	extend : "Ext.layout.container.Container",
	requires : ["Ext.resizer.Splitter", "Ext.container.Container",
			"Ext.fx.Anim"],
	alternateClassName : "Ext.layout.BorderLayout",
	targetCls : Ext.baseCSSPrefix + "border-layout-ct",
	itemCls : Ext.baseCSSPrefix + "border-item",
	bindToOwnerCtContainer : true,
	fixedLayout : false,
	percentageRe : /(\d+)%/,
	slideDirection : {
		north : "t",
		south : "b",
		west : "l",
		east : "r"
	},
	constructor : function(a) {
		this.initialConfig = a;
		this.callParent(arguments)
	},
	onLayout : function() {
		var a = this;
		if (!a.borderLayoutInitialized) {
			a.initializeBorderLayout()
		}
		a.shadowLayout.onLayout();
		if (a.embeddedContainer) {
			a.embeddedContainer.layout.onLayout()
		}
		if (!a.initialCollapsedComplete) {
			Ext.iterate(a.regions, function(b, c) {
						if (c.borderCollapse) {
							a.onBeforeRegionCollapse(c, c.collapseDirection,
									false, 0)
						}
					});
			a.initialCollapsedComplete = true
		}
	},
	isValidParent : function(b, c, a) {
		if (!this.borderLayoutInitialized) {
			this.initializeBorderLayout()
		}
		return this.shadowLayout.isValidParent(b, c, a)
	},
	beforeLayout : function() {
		if (!this.borderLayoutInitialized) {
			this.initializeBorderLayout()
		}
		this.shadowLayout.beforeLayout()
	},
	renderItems : function(a, b) {
	},
	renderItem : function(a) {
	},
	initializeBorderLayout : function() {
		var j = this, c = 0, h = j.getLayoutItems(), g = h.length, b = (j.regions = {}), e = [], f = [], a = 0, l = 0, d, k;
		j.splitters = {};
		for (; c < g; c++) {
			d = h[c];
			b[d.region] = d;
			if (d.region != "center" && d.collapsible
					&& d.collapseMode != "header") {
				d.borderCollapse = d.collapsed;
				delete d.collapsed;
				d.on({
							beforecollapse : j.onBeforeRegionCollapse,
							beforeexpand : j.onBeforeRegionExpand,
							destroy : j.onRegionDestroy,
							scope : j
						});
				j.setupState(d)
			}
		}
		d = b.center;
		if (!d.flex) {
			d.flex = 1
		}
		delete d.width;
		d.maintainFlex = true;
		d = b.west;
		if (d) {
			d.collapseDirection = Ext.Component.DIRECTION_LEFT;
			f.push(d);
			if (d.split) {
				f.push(j.splitters.west = j.createSplitter(d))
			}
			k = Ext.isString(d.width) && d.width.match(j.percentageRe);
			if (k) {
				a += (d.flex = parseInt(k[1], 10) / 100);
				delete d.width
			}
		}
		d = b.north;
		if (d) {
			d.collapseDirection = Ext.Component.DIRECTION_TOP;
			e.push(d);
			if (d.split) {
				e.push(j.splitters.north = j.createSplitter(d))
			}
			k = Ext.isString(d.height) && d.height.match(j.percentageRe);
			if (k) {
				l += (d.flex = parseInt(k[1], 10) / 100);
				delete d.height
			}
		}
		if (b.north || b.south) {
			if (b.east || b.west) {
				e.push(j.embeddedContainer = Ext.create(
						"Ext.container.Container", {
							xtype : "container",
							region : "center",
							id : j.owner.id + "-embedded-center",
							cls : Ext.baseCSSPrefix + "border-item",
							flex : b.center.flex,
							maintainFlex : true,
							layout : {
								type : "hbox",
								align : "stretch"
							}
						}));
				f.push(b.center)
			} else {
				e.push(b.center)
			}
		} else {
			f.push(b.center)
		}
		d = b.south;
		if (d) {
			d.collapseDirection = Ext.Component.DIRECTION_BOTTOM;
			if (d.split) {
				e.push(j.splitters.south = j.createSplitter(d))
			}
			k = Ext.isString(d.height) && d.height.match(j.percentageRe);
			if (k) {
				l += (d.flex = parseInt(k[1], 10) / 100);
				delete d.height
			}
			e.push(d)
		}
		d = b.east;
		if (d) {
			d.collapseDirection = Ext.Component.DIRECTION_RIGHT;
			if (d.split) {
				f.push(j.splitters.east = j.createSplitter(d))
			}
			k = Ext.isString(d.width) && d.width.match(j.percentageRe);
			if (k) {
				a += (d.flex = parseInt(k[1], 10) / 100);
				delete d.width
			}
			f.push(d)
		}
		if (b.north || b.south) {
			j.shadowContainer = Ext.create("Ext.container.Container", {
						ownerCt : j.owner,
						el : j.getTarget(),
						layout : Ext.applyIf({
									type : "vbox",
									align : "stretch"
								}, j.initialConfig)
					});
			j.createItems(j.shadowContainer, e);
			if (j.splitters.north) {
				j.splitters.north.ownerCt = j.shadowContainer
			}
			if (j.splitters.south) {
				j.splitters.south.ownerCt = j.shadowContainer
			}
			if (j.embeddedContainer) {
				j.embeddedContainer.ownerCt = j.shadowContainer;
				j.createItems(j.embeddedContainer, f);
				if (j.splitters.east) {
					j.splitters.east.ownerCt = j.embeddedContainer
				}
				if (j.splitters.west) {
					j.splitters.west.ownerCt = j.embeddedContainer
				}
				if (a) {
					b.center.flex -= a
				}
				if (l) {
					j.embeddedContainer.flex -= l
				}
			} else {
				if (l) {
					b.center.flex -= l
				}
			}
		} else {
			j.shadowContainer = Ext.create("Ext.container.Container", {
						ownerCt : j.owner,
						el : j.getTarget(),
						layout : Ext.applyIf({
									type : (f.length == 1) ? "fit" : "hbox",
									align : "stretch"
								}, j.initialConfig)
					});
			j.createItems(j.shadowContainer, f);
			if (j.splitters.east) {
				j.splitters.east.ownerCt = j.shadowContainer
			}
			if (j.splitters.west) {
				j.splitters.west.ownerCt = j.shadowContainer
			}
			if (a) {
				b.center.flex -= l
			}
		}
		for (c = 0, h = j.shadowContainer.items.items, g = h.length; c < g; c++) {
			h[c].shadowOwnerCt = j.shadowContainer
		}
		if (j.embeddedContainer) {
			for (c = 0, h = j.embeddedContainer.items.items, g = h.length; c < g; c++) {
				h[c].shadowOwnerCt = j.embeddedContainer
			}
		}
		j.shadowLayout = j.shadowContainer.getLayout();
		j.borderLayoutInitialized = true
	},
	setupState : function(b) {
		var a = b.getState;
		b.getState = function() {
			var c = a.call(b) || {}, d = b.region;
			c.collapsed = !!b.collapsed;
			if (d == "west" || d == "east") {
				c.width = b.getWidth()
			} else {
				c.height = b.getHeight()
			}
			return c
		};
		b.addStateEvents(["collapse", "expand", "resize"])
	},
	createItems : function(a, b) {
		delete a.items;
		a.initItems();
		a.items.addAll(b)
	},
	createSplitter : function(a) {
		var b = this, c = (a.collapseMode != "header"), d;
		d = Ext.create("Ext.resizer.Splitter", {
					hidden : !!a.hidden,
					collapseTarget : a,
					performCollapse : !c,
					listeners : c ? {
						click : {
							fn : Ext.Function.bind(b.onSplitterCollapseClick,
									b, [a]),
							element : "collapseEl"
						}
					} : null
				});
		if (a.collapseMode == "mini") {
			a.placeholder = d
		}
		a.on({
					hide : b.onRegionVisibilityChange,
					show : b.onRegionVisibilityChange,
					scope : b
				});
		return d
	},
	onRegionVisibilityChange : function(a) {
		this.splitters[a.region][a.hidden ? "hide" : "show"]();
		this.layout()
	},
	onSplitterCollapseClick : function(a) {
		if (a.collapsed) {
			this.onPlaceHolderToolClick(null, null, null, {
						client : a
					})
		} else {
			a.collapse()
		}
	},
	getPlaceholder : function(c) {
		var d = this, f = c.placeholder, b = c.shadowOwnerCt, e = b.layout, a = Ext.panel.Panel.prototype
				.getOppositeDirection(c.collapseDirection), g = (c.region == "north" || c.region == "south");
		if (c.collapseMode == "header") {
			return
		}
		if (!f) {
			if (c.collapseMode == "mini") {
				f = Ext.create("Ext.resizer.Splitter", {
							id : "collapse-placeholder-" + c.id,
							collapseTarget : c,
							performCollapse : false,
							listeners : {
								click : {
									fn : Ext.Function.bind(
											d.onSplitterCollapseClick, d, [c]),
									element : "collapseEl"
								}
							}
						});
				f.addCls(f.collapsedCls)
			} else {
				f = {
					id : "collapse-placeholder-" + c.id,
					margins : c.initialConfig.margins
							|| Ext.getClass(c).prototype.margins,
					xtype : "header",
					orientation : g ? "horizontal" : "vertical",
					title : c.title,
					textCls : c.headerTextCls,
					iconCls : c.iconCls,
					baseCls : c.baseCls + "-header",
					ui : c.ui,
					indicateDrag : c.draggable,
					cls : Ext.baseCSSPrefix + "region-collapsed-placeholder "
							+ Ext.baseCSSPrefix + "region-collapsed-"
							+ c.collapseDirection + "-placeholder",
					listeners : c.floatable ? {
						click : {
							fn : function(h) {
								d.floatCollapsedPanel(h, c)
							},
							element : "el"
						}
					} : null
				};
				if ((Ext.isIE6 || Ext.isIE7 || (Ext.isIEQuirks)) && !g) {
					f.width = 25
				}
				f[g ? "tools" : "items"] = [{
							xtype : "tool",
							client : c,
							type : "expand-" + a,
							handler : d.onPlaceHolderToolClick,
							scope : d
						}]
			}
			f = d.owner.createComponent(f);
			if (c.isXType("panel")) {
				c.on({
							titlechange : d.onRegionTitleChange,
							iconchange : d.onRegionIconChange,
							scope : d
						})
			}
		}
		c.placeholder = f;
		f.comp = c;
		return f
	},
	onRegionTitleChange : function(a, b) {
		a.placeholder.setTitle(b)
	},
	onRegionIconChange : function(b, a) {
		b.placeholder.setIconCls(a)
	},
	calculateChildBox : function(a) {
		var b = this;
		if (b.shadowContainer.items.contains(a)) {
			return b.shadowContainer.layout.calculateChildBox(a)
		} else {
			if (b.embeddedContainer && b.embeddedContainer.items.contains(a)) {
				return b.embeddedContainer.layout.calculateChildBox(a)
			}
		}
	},
	onBeforeRegionCollapse : function(h, k, c) {
		var j = this, o = h.el, b = h.collapseMode == "mini", i = h.shadowOwnerCt, a = i.layout, m = h.placeholder, g, f = a
				.getLayoutTargetSize(), e = j.owner.suspendLayout, l = i.suspendLayout, n = (h.region == "north" || h.region == "west");
		j.owner.suspendLayout = true;
		i.suspendLayout = true;
		a.layoutBusy = true;
		if (i.componentLayout) {
			i.componentLayout.layoutBusy = true
		}
		j.shadowContainer.layout.layoutBusy = true;
		j.layoutBusy = true;
		j.owner.componentLayout.layoutBusy = true;
		if (!m) {
			m = j.getPlaceholder(h)
		}
		if (m.shadowOwnerCt === i) {
			m.show()
		} else {
			i.insert(i.items.indexOf(h) + (n ? 0 : 1), m);
			m.shadowOwnerCt = i;
			m.ownerCt = j.owner
		}
		h.hidden = true;
		if (!m.rendered) {
			a.renderItem(m, a.innerCt)
		}
		function d() {
			j.owner.suspendLayout = e;
			i.suspendLayout = l;
			delete a.layoutBusy;
			if (i.componentLayout) {
				delete i.componentLayout.layoutBusy
			}
			delete j.shadowContainer.layout.layoutBusy;
			delete j.layoutBusy;
			delete j.owner.componentLayout.layoutBusy;
			h.collapsed = true;
			h.fireEvent("collapse", h)
		}
		if (h.animCollapse && j.initialCollapsedComplete) {
			a.layout();
			o.dom.style.zIndex = 100;
			if (!b) {
				m.el.hide()
			}
			o.slideOut(j.slideDirection[h.region], {
						duration : Ext.Number.from(h.animCollapse,
								Ext.fx.Anim.prototype.duration),
						listeners : {
							afteranimate : function() {
								o.show().setLeftTop(-10000, -10000);
								o.dom.style.zIndex = "";
								if (!b) {
									m.el.slideIn(j.slideDirection[h.region], {
												easing : "linear",
												duration : 100
											})
								}
								d()
							}
						}
					})
		} else {
			o.setLeftTop(-10000, -10000);
			a.layout();
			d();
			if (Ext.isIE) {
				m.setCalculatedSize(m.el.getWidth())
			}
		}
		return false
	},
	onBeforeRegionExpand : function(b, a) {
		this.onPlaceHolderToolClick(null, null, null, {
					client : b
				});
		return false
	},
	onPlaceHolderToolClick : function(m, s, a, c) {
		var r = this, o = c.client, h = (o.collapseMode != "mini") || !o.split, q = o.el, j, d = o.placeholder, k = d.el, p = o.shadowOwnerCt, b = p.layout, i, n = r.owner.suspendLayout, l = p.suspendLayout, g;
		if (o.getActiveAnimation()) {
			o.stopAnimation()
		}
		if (o.slideOutAnim) {
			q.un(o.panelMouseMon);
			k.un(o.placeholderMouseMon);
			delete o.slideOutAnim;
			delete o.panelMouseMon;
			delete o.placeholderMouseMon;
			g = true
		}
		r.owner.suspendLayout = true;
		p.suspendLayout = true;
		b.layoutBusy = true;
		if (p.componentLayout) {
			p.componentLayout.layoutBusy = true
		}
		r.shadowContainer.layout.layoutBusy = true;
		r.layoutBusy = true;
		r.owner.componentLayout.layoutBusy = true;
		o.hidden = false;
		o.collapsed = false;
		if (h) {
			d.hidden = true
		}
		j = b.calculateChildBox(o);
		if (o.collapseTool) {
			o.collapseTool.show()
		}
		if (o.animCollapse && !g) {
			q.setStyle("visibility", "hidden")
		}
		q.setLeftTop(j.left, j.top);
		i = o.getSize();
		if (i.height != j.height || i.width != j.width) {
			r.setItemSize(o, j.width, j.height)
		}
		function f() {
			r.owner.suspendLayout = n;
			p.suspendLayout = l;
			delete b.layoutBusy;
			if (p.componentLayout) {
				delete p.componentLayout.layoutBusy
			}
			delete r.shadowContainer.layout.layoutBusy;
			delete r.layoutBusy;
			delete r.owner.componentLayout.layoutBusy;
			o.removeCls(Ext.baseCSSPrefix + "border-region-slide-in");
			o.fireEvent("expand", o)
		}
		if (h) {
			d.el.hide()
		}
		if (o.animCollapse && !g) {
			q.dom.style.zIndex = 100;
			q.slideIn(r.slideDirection[o.region], {
						duration : Ext.Number.from(o.animCollapse,
								Ext.fx.Anim.prototype.duration),
						listeners : {
							afteranimate : function() {
								q.dom.style.zIndex = "";
								o.hidden = false;
								b.onLayout();
								f()
							}
						}
					})
		} else {
			b.onLayout();
			f()
		}
	},
	floatCollapsedPanel : function(i, g) {
		if (g.floatable === false) {
			return
		}
		var j = this, o = g.el, m = g.placeholder, n = m.el, h = g.shadowOwnerCt, b = h.layout, f = b
				.getChildBox(m), l = h.suspendLayout, a, d, k;
		if (i.getTarget("." + Ext.baseCSSPrefix + "tool")) {
			return
		}
		if (o.getActiveAnimation()) {
			return
		}
		if (g.slideOutAnim) {
			j.slideOutFloatedComponent(g);
			return
		}
		function c(q) {
			var p = o.getRegion().union(n.getRegion()).adjust(1, -1, -1, 1);
			if (!p.contains(q.getPoint())) {
				j.slideOutFloatedComponent(g)
			}
		}
		g.placeholderMouseMon = n.monitorMouseLeave(500, c);
		h.suspendLayout = true;
		j.layoutBusy = true;
		j.owner.componentLayout.layoutBusy = true;
		if (g.collapseTool) {
			g.collapseTool.hide()
		}
		g.hidden = false;
		g.collapsed = false;
		m.hidden = true;
		d = b.calculateChildBox(g);
		m.hidden = false;
		if (g.region == "north" || g.region == "west") {
			d[b.parallelBefore] += f[b.parallelPrefix] - 1
		} else {
			d[b.parallelBefore] -= (f[b.parallelPrefix] - 1)
		}
		o.setStyle("visibility", "hidden");
		o.setLeftTop(d.left, d.top);
		a = g.getSize();
		if (a.height != d.height || a.width != d.width) {
			j.setItemSize(g, d.width, d.height)
		}
		k = {
			listeners : {
				afteranimate : function() {
					h.suspendLayout = l;
					delete j.layoutBusy;
					delete j.owner.componentLayout.layoutBusy;
					k.listeners = {
						afterAnimate : function() {
							o.show().removeCls(Ext.baseCSSPrefix
									+ "border-region-slide-in").setLeftTop(
									-10000, -10000);
							g.hidden = true;
							g.collapsed = true;
							delete g.slideOutAnim;
							delete g.panelMouseMon;
							delete g.placeholderMouseMon
						}
					};
					g.slideOutAnim = k
				}
			},
			duration : 500
		};
		o.addCls(Ext.baseCSSPrefix + "border-region-slide-in");
		o.slideIn(j.slideDirection[g.region], k);
		g.panelMouseMon = o.monitorMouseLeave(500, c)
	},
	slideOutFloatedComponent : function(a) {
		var c = a.el, b;
		c.un(a.panelMouseMon);
		a.placeholder.el.un(a.placeholderMouseMon);
		c.slideOut(this.slideDirection[a.region], a.slideOutAnim);
		delete a.slideOutAnim;
		delete a.panelMouseMon;
		delete a.placeholderMouseMon
	},
	onRegionDestroy : function(a) {
		var b = a.placeholder;
		if (b) {
			delete b.ownerCt;
			b.destroy()
		}
	},
	onDestroy : function() {
		var b = this, a = b.shadowContainer, c = b.embeddedContainer;
		if (a) {
			delete a.ownerCt;
			Ext.destroy(a)
		}
		if (c) {
			delete c.ownerCt;
			Ext.destroy(c)
		}
		delete b.regions;
		delete b.splitters;
		delete b.shadowContainer;
		delete b.embeddedContainer;
		b.callParent(arguments)
	}
});
Ext.define("Ext.grid.Lockable", {
	requires : ["Ext.grid.LockingView"],
	syncRowHeight : true,
	spacerHidden : true,
	unlockText : "Unlock",
	lockText : "Lock",
	determineXTypeToCreate : function() {
		var c = this, f;
		if (c.subGridXType) {
			f = c.subGridXType
		} else {
			var d = this.getXTypes().split("/"), b = d.length, e = d[b - 1], a = d[b
					- 2];
			if (a !== "tablepanel") {
				f = a
			} else {
				f = e
			}
		}
		return f
	},
	injectLockable : function() {
		this.lockable = true;
		this.hasView = true;
		var j = this, a = j.determineXTypeToCreate(), g = j.getSelectionModel(), b = {
			xtype : a,
			enableAnimations : false,
			scroll : false,
			scrollerOwner : false,
			selModel : g,
			border : false,
			cls : Ext.baseCSSPrefix + "grid-inner-locked"
		}, h = {
			xtype : a,
			enableAnimations : false,
			scrollerOwner : false,
			selModel : g,
			border : false
		}, e = 0, d, c, f;
		j.addCls(Ext.baseCSSPrefix + "grid-locked");
		Ext.copyTo(h, j, j.normalCfgCopy);
		Ext.copyTo(b, j, j.lockedCfgCopy);
		for (; e < j.normalCfgCopy.length; e++) {
			delete j[j.normalCfgCopy[e]]
		}
		for (e = 0; e < j.lockedCfgCopy.length; e++) {
			delete j[j.lockedCfgCopy[e]]
		}
		j.lockedHeights = [];
		j.normalHeights = [];
		d = j.processColumns(j.columns);
		b.width = d.lockedWidth;
		b.columns = d.locked;
		h.columns = d.normal;
		j.store = Ext.StoreManager.lookup(j.store);
		b.store = j.store;
		h.store = j.store;
		h.flex = 1;
		b.viewConfig = j.lockedViewConfig || {};
		b.viewConfig.loadingUseMsg = false;
		h.viewConfig = j.normalViewConfig || {};
		Ext.applyIf(b.viewConfig, j.viewConfig);
		Ext.applyIf(h.viewConfig, j.viewConfig);
		j.normalGrid = Ext.ComponentManager.create(h);
		j.lockedGrid = Ext.ComponentManager.create(b);
		j.view = Ext.create("Ext.grid.LockingView", {
					locked : j.lockedGrid,
					normal : j.normalGrid,
					panel : j
				});
		if (j.syncRowHeight) {
			j.lockedGrid.getView().on({
						refresh : j.onLockedGridAfterRefresh,
						itemupdate : j.onLockedGridAfterUpdate,
						scope : j
					});
			j.normalGrid.getView().on({
						refresh : j.onNormalGridAfterRefresh,
						itemupdate : j.onNormalGridAfterUpdate,
						scope : j
					})
		}
		c = j.lockedGrid.headerCt;
		f = j.normalGrid.headerCt;
		c.lockedCt = true;
		c.lockableInjected = true;
		f.lockableInjected = true;
		c.on({
					columnshow : j.onLockedHeaderShow,
					columnhide : j.onLockedHeaderHide,
					columnmove : j.onLockedHeaderMove,
					sortchange : j.onLockedHeaderSortChange,
					columnresize : j.onLockedHeaderResize,
					scope : j
				});
		f.on({
					columnmove : j.onNormalHeaderMove,
					sortchange : j.onNormalHeaderSortChange,
					scope : j
				});
		j.normalGrid.on({
					scrollershow : j.onScrollerShow,
					scrollerhide : j.onScrollerHide,
					scope : j
				});
		j.lockedGrid.on("afterlayout", j.onLockedGridAfterLayout, j, {
					single : true
				});
		j.modifyHeaderCt();
		j.items = [j.lockedGrid, j.normalGrid];
		j.layout = {
			type : "hbox",
			align : "stretch"
		}
	},
	processColumns : function(f) {
		var e = 0, a = f.length, b = 0, d = [], c = [], g;
		for (; e < a; ++e) {
			g = f[e];
			g.processed = true;
			if (g.locked) {
				b += g.width;
				d.push(g)
			} else {
				c.push(g)
			}
		}
		return {
			lockedWidth : b,
			locked : d,
			normal : c
		}
	},
	onLockedGridAfterLayout : function() {
		var b = this, a = b.lockedGrid.getView();
		a.on({
					refresh : b.createSpacer,
					beforerefresh : b.destroySpacer,
					scope : b
				})
	},
	onLockedHeaderMove : function() {
		if (this.syncRowHeight) {
			this.onNormalGridAfterRefresh()
		}
	},
	onNormalHeaderMove : function() {
		if (this.syncRowHeight) {
			this.onLockedGridAfterRefresh()
		}
	},
	createSpacer : function() {
		var d = this, b = Ext.getScrollBarWidth() + (Ext.isIE ? 2 : 0), a = d.lockedGrid
				.getView(), c = a.el;
		d.spacerEl = Ext.core.DomHelper.append(c, {
					cls : d.spacerHidden ? (Ext.baseCSSPrefix + "hidden") : "",
					style : "height: " + b + "px;"
				}, true)
	},
	destroySpacer : function() {
		var a = this;
		if (a.spacerEl) {
			a.spacerEl.destroy();
			delete a.spacerEl
		}
	},
	onLockedGridAfterRefresh : function() {
		var e = this, a = e.lockedGrid.getView(), c = a.el, f = c.query(a
				.getItemSelector()), d = f.length, b = 0;
		e.lockedHeights = [];
		for (; b < d; b++) {
			e.lockedHeights[b] = f[b].clientHeight
		}
		e.syncRowHeights()
	},
	onNormalGridAfterRefresh : function() {
		var e = this, a = e.normalGrid.getView(), c = a.el, f = c.query(a
				.getItemSelector()), d = f.length, b = 0;
		e.normalHeights = [];
		for (; b < d; b++) {
			e.normalHeights[b] = f[b].clientHeight
		}
		e.syncRowHeights()
	},
	onLockedGridAfterUpdate : function(a, b, c) {
		this.lockedHeights[b] = c.clientHeight;
		this.syncRowHeights()
	},
	onNormalGridAfterUpdate : function(a, b, c) {
		this.normalHeights[b] = c.clientHeight;
		this.syncRowHeights()
	},
	syncRowHeights : function() {
		var k = this, b = k.lockedHeights, l = k.normalHeights, a = [], j = b.length, g = 0, m, d, e, h, f = k
				.getVerticalScroller(), c;
		if (b.length && l.length) {
			m = k.lockedGrid.getView();
			d = k.normalGrid.getView();
			e = m.el.query(m.getItemSelector());
			h = d.el.query(d.getItemSelector());
			for (; g < j; g++) {
				if (!isNaN(b[g]) && !isNaN(l[g])) {
					if (b[g] > l[g]) {
						Ext.fly(h[g]).setHeight(b[g])
					} else {
						if (b[g] < l[g]) {
							Ext.fly(e[g]).setHeight(l[g])
						}
					}
				}
			}
			k.normalGrid.invalidateScroller();
			if (f && f.setViewScrollTop) {
				f.setViewScrollTop(k.virtualScrollTop)
			} else {
				c = d.el.dom.scrollTop;
				d.el.dom.scrollTop = c;
				m.el.dom.scrollTop = c
			}
			k.lockedHeights = [];
			k.normalHeights = []
		}
	},
	onScrollerShow : function(a, b) {
		if (b === "horizontal") {
			this.spacerHidden = false;
			this.spacerEl.removeCls(Ext.baseCSSPrefix + "hidden")
		}
	},
	onScrollerHide : function(a, b) {
		if (b === "horizontal") {
			this.spacerHidden = true;
			this.spacerEl.addCls(Ext.baseCSSPrefix + "hidden")
		}
	},
	modifyHeaderCt : function() {
		var a = this;
		a.lockedGrid.headerCt.getMenuItems = a.getMenuItems(true);
		a.normalGrid.headerCt.getMenuItems = a.getMenuItems(false)
	},
	onUnlockMenuClick : function() {
		this.unlock()
	},
	onLockMenuClick : function() {
		this.lock()
	},
	getMenuItems : function(b) {
		var f = this, g = f.unlockText, h = f.lockText, c = "xg-hmenu-unlock", e = "xg-hmenu-lock", a = Ext.Function
				.bind(f.onUnlockMenuClick, f), d = Ext.Function.bind(
				f.onLockMenuClick, f);
		return function() {
			var i = Ext.grid.header.Container.prototype.getMenuItems.call(this);
			i.push("-", {
						cls : c,
						text : g,
						handler : a,
						disabled : !b
					});
			i.push({
						cls : e,
						text : h,
						handler : d,
						disabled : b
					});
			return i
		}
	},
	lock : function(a, d) {
		var c = this, e = c.normalGrid, g = c.lockedGrid, f = e.headerCt, b = g.headerCt;
		a = a || f.getMenu().activeHeader;
		if (a.flex) {
			a.width = a.getWidth();
			delete a.flex
		}
		f.remove(a, false);
		b.suspendLayout = true;
		if (Ext.isDefined(d)) {
			b.insert(d, a)
		} else {
			b.add(a)
		}
		b.suspendLayout = false;
		c.syncLockedSection()
	},
	syncLockedSection : function() {
		var a = this;
		a.syncLockedWidth();
		a.lockedGrid.getView().refresh();
		a.normalGrid.getView().refresh()
	},
	syncLockedWidth : function() {
		var b = this, a = b.lockedGrid.headerCt.getFullWidth(true);
		b.lockedGrid.setWidth(a)
	},
	onLockedHeaderResize : function() {
		this.syncLockedWidth()
	},
	onLockedHeaderHide : function() {
		this.syncLockedWidth()
	},
	onLockedHeaderShow : function() {
		this.syncLockedWidth()
	},
	onLockedHeaderSortChange : function(b, c, a) {
		if (a) {
			this.normalGrid.headerCt.clearOtherSortStates(null, true)
		}
	},
	onNormalHeaderSortChange : function(b, c, a) {
		if (a) {
			this.lockedGrid.headerCt.clearOtherSortStates(null, true)
		}
	},
	unlock : function(a, d) {
		var c = this, e = c.normalGrid, g = c.lockedGrid, f = e.headerCt, b = g.headerCt;
		if (!Ext.isDefined(d)) {
			d = 0
		}
		a = a || b.getMenu().activeHeader;
		b.remove(a, false);
		c.syncLockedWidth();
		c.lockedGrid.getView().refresh();
		f.insert(d, a);
		c.normalGrid.getView().refresh()
	},
	reconfigureLockable : function(a, b) {
		var c = this, e = c.lockedGrid, d = c.normalGrid;
		if (b) {
			e.headerCt.removeAll();
			d.headerCt.removeAll();
			b = c.processColumns(b);
			e.setWidth(b.lockedWidth);
			e.headerCt.add(b.locked);
			d.headerCt.add(b.normal)
		}
		if (a) {
			a = Ext.data.StoreManager.lookup(a);
			c.store = a;
			e.bindStore(a);
			d.bindStore(a)
		} else {
			e.getView().refresh();
			d.getView().refresh()
		}
	}
});
Ext.define("Ext.draw.Sprite", {
	mixins : {
		observable : "Ext.util.Observable",
		animate : "Ext.util.Animate"
	},
	requires : ["Ext.draw.SpriteDD"],
	dirty : false,
	dirtyHidden : false,
	dirtyTransform : false,
	dirtyPath : true,
	dirtyFont : true,
	zIndexDirty : true,
	isSprite : true,
	zIndex : 0,
	fontProperties : ["font", "font-size", "font-weight", "font-style",
			"font-family", "text-anchor", "text"],
	pathProperties : ["x", "y", "d", "path", "height", "width", "radius", "r",
			"rx", "ry", "cx", "cy"],
	constructor : function(a) {
		var b = this;
		a = a || {};
		b.id = Ext.id(null, "ext-sprite-");
		b.transformations = [];
		Ext.copyTo(this, a, "surface,group,type,draggable");
		b.bbox = {};
		b.attr = {
			zIndex : 0,
			translation : {
				x : null,
				y : null
			},
			rotation : {
				degrees : null,
				x : null,
				y : null
			},
			scaling : {
				x : null,
				y : null,
				cx : null,
				cy : null
			}
		};
		delete a.surface;
		delete a.group;
		delete a.type;
		delete a.draggable;
		b.setAttributes(a);
		b.addEvents("beforedestroy", "destroy", "render", "mousedown",
				"mouseup", "mouseover", "mouseout", "mousemove", "click");
		b.mixins.observable.constructor.apply(this, arguments)
	},
	initDraggable : function() {
		var a = this;
		a.draggable = true;
		if (!a.el) {
			a.surface.createSprite(a)
		}
		a.dd = Ext.create("Ext.draw.SpriteDD", a, Ext.isBoolean(a.draggable)
						? null
						: a.draggable);
		a.on("beforedestroy", a.dd.destroy, a.dd)
	},
	setAttributes : function(j, m) {
		var r = this, h = r.fontProperties, p = h.length, f = r.pathProperties, e = f.length, q = !!r.surface, a = q
				&& r.surface.customAttributes || {}, b = r.attr, k, n, g, c, o, l, s, d;
		for (k in a) {
			if (j.hasOwnProperty(k) && typeof a[k] == "function") {
				Ext.apply(j, a[k].apply(r, [].concat(j[k])))
			}
		}
		if (!!j.hidden !== !!b.hidden) {
			r.dirtyHidden = true
		}
		for (n = 0; n < e; n++) {
			k = f[n];
			if (k in j && j[k] !== b[k]) {
				r.dirtyPath = true;
				break
			}
		}
		if ("zIndex" in j) {
			r.zIndexDirty = true
		}
		for (n = 0; n < p; n++) {
			k = h[n];
			if (k in j && j[k] !== b[k]) {
				r.dirtyFont = true;
				break
			}
		}
		g = j.translate;
		c = b.translation;
		if (g) {
			if ((g.x && g.x !== c.x) || (g.y && g.y !== c.y)) {
				Ext.apply(c, g);
				r.dirtyTransform = true
			}
			delete j.translate
		}
		o = j.rotate;
		l = b.rotation;
		if (o) {
			if ((o.x && o.x !== l.x) || (o.y && o.y !== l.y)
					|| (o.degrees && o.degrees !== l.degrees)) {
				Ext.apply(l, o);
				r.dirtyTransform = true
			}
			delete j.rotate
		}
		s = j.scale;
		d = b.scaling;
		if (s) {
			if ((s.x && s.x !== d.x) || (s.y && s.y !== d.y)
					|| (s.cx && s.cx !== d.cx) || (s.cy && s.cy !== d.cy)) {
				Ext.apply(d, s);
				r.dirtyTransform = true
			}
			delete j.scale
		}
		Ext.apply(b, j);
		r.dirty = true;
		if (m === true && q) {
			r.redraw()
		}
		return this
	},
	getBBox : function() {
		return this.surface.getBBox(this)
	},
	setText : function(a) {
		return this.surface.setText(this, a)
	},
	hide : function(a) {
		this.setAttributes({
					hidden : true
				}, a);
		return this
	},
	show : function(a) {
		this.setAttributes({
					hidden : false
				}, a);
		return this
	},
	remove : function() {
		if (this.surface) {
			this.surface.remove(this);
			return true
		}
		return false
	},
	onRemove : function() {
		this.surface.onRemove(this)
	},
	destroy : function() {
		var a = this;
		if (a.fireEvent("beforedestroy", a) !== false) {
			a.remove();
			a.surface.onDestroy(a);
			a.clearListeners();
			a.fireEvent("destroy")
		}
	},
	redraw : function() {
		this.surface.renderItem(this);
		return this
	},
	setStyle : function() {
		this.el.setStyle.apply(this.el, arguments);
		return this
	},
	addCls : function(a) {
		this.surface.addCls(this, a);
		return this
	},
	removeCls : function(a) {
		this.surface.removeCls(this, a);
		return this
	}
});
Ext.define("Ext.draw.engine.Svg", {
	extend : "Ext.draw.Surface",
	requires : ["Ext.draw.Draw", "Ext.draw.Sprite", "Ext.draw.Matrix",
			"Ext.core.Element"],
	engine : "Svg",
	trimRe : /^\s+|\s+$/g,
	spacesRe : /\s+/,
	xlink : "http://www.w3.org/1999/xlink",
	translateAttrs : {
		radius : "r",
		radiusX : "rx",
		radiusY : "ry",
		path : "d",
		lineWidth : "stroke-width",
		fillOpacity : "fill-opacity",
		strokeOpacity : "stroke-opacity",
		strokeLinejoin : "stroke-linejoin"
	},
	minDefaults : {
		circle : {
			cx : 0,
			cy : 0,
			r : 0,
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		ellipse : {
			cx : 0,
			cy : 0,
			rx : 0,
			ry : 0,
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		rect : {
			x : 0,
			y : 0,
			width : 0,
			height : 0,
			rx : 0,
			ry : 0,
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		text : {
			x : 0,
			y : 0,
			"text-anchor" : "start",
			"font-family" : null,
			"font-size" : null,
			"font-weight" : null,
			"font-style" : null,
			fill : "#000",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		path : {
			d : "M0,0",
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		image : {
			x : 0,
			y : 0,
			width : 0,
			height : 0,
			preserveAspectRatio : "none",
			opacity : null
		}
	},
	createSvgElement : function(d, a) {
		var c = this.domRef.createElementNS("http://www.w3.org/2000/svg", d), b;
		if (a) {
			for (b in a) {
				c.setAttribute(b, String(a[b]))
			}
		}
		return c
	},
	createSpriteElement : function(a) {
		var b = this.createSvgElement(a.type);
		b.id = a.id;
		if (b.style) {
			b.style.webkitTapHighlightColor = "rgba(0,0,0,0)"
		}
		a.el = Ext.get(b);
		this.applyZIndex(a);
		a.matrix = Ext.create("Ext.draw.Matrix");
		a.bbox = {
			plain : 0,
			transform : 0
		};
		a.fireEvent("render", a);
		return b
	},
	getBBox : function(a, b) {
		var c = this["getPath" + a.type](a);
		if (b) {
			a.bbox.plain = a.bbox.plain || Ext.draw.Draw.pathDimensions(c);
			return a.bbox.plain
		}
		a.bbox.transform = a.bbox.transform
				|| Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,
						a.matrix));
		return a.bbox.transform
	},
	getBBoxText : function(h) {
		var j = {}, f, k, a, c, g, b;
		if (h && h.el) {
			b = h.el.dom;
			try {
				j = b.getBBox();
				return j
			} catch (d) {
			}
			j = {
				x : j.x,
				y : Infinity,
				width : 0,
				height : 0
			};
			g = b.getNumberOfChars();
			for (c = 0; c < g; c++) {
				f = b.getExtentOfChar(c);
				j.y = Math.min(f.y, j.y);
				k = f.y + f.height - j.y;
				j.height = Math.max(j.height, k);
				a = f.x + f.width - j.x;
				j.width = Math.max(j.width, a)
			}
			return j
		}
	},
	hide : function() {
		Ext.get(this.el).hide()
	},
	show : function() {
		Ext.get(this.el).show()
	},
	hidePrim : function(a) {
		this.addCls(a, Ext.baseCSSPrefix + "hide-visibility")
	},
	showPrim : function(a) {
		this.removeCls(a, Ext.baseCSSPrefix + "hide-visibility")
	},
	getDefs : function() {
		return this._defs || (this._defs = this.createSvgElement("defs"))
	},
	transform : function(d) {
		var g = this, a = Ext.create("Ext.draw.Matrix"), f = d.transformations, h = f.length, c = 0, b, e;
		for (; c < h; c++) {
			b = f[c];
			e = b.type;
			if (e == "translate") {
				a.translate(b.x, b.y)
			} else {
				if (e == "rotate") {
					a.rotate(b.degrees, b.x, b.y)
				} else {
					if (e == "scale") {
						a.scale(b.x, b.y, b.centerX, b.centerY)
					}
				}
			}
		}
		d.matrix = a;
		d.el.set({
					transform : a.toSvg()
				})
	},
	setSize : function(a, c) {
		var d = this, b = d.el;
		a = +a || d.width;
		c = +c || d.height;
		d.width = a;
		d.height = c;
		b.setSize(a, c);
		b.set({
					width : a,
					height : c
				});
		d.callParent([a, c])
	},
	getRegion : function() {
		var e = this.el.getXY(), c = this.bgRect.getXY(), b = Math.max, a = b(
				e[0], c[0]), d = b(e[1], c[1]);
		return {
			left : a,
			top : d,
			right : a + this.width,
			bottom : d + this.height
		}
	},
	onRemove : function(a) {
		if (a.el) {
			a.el.remove();
			delete a.el
		}
		this.callParent(arguments)
	},
	setViewBox : function(b, d, c, a) {
		if (isFinite(b) && isFinite(d) && isFinite(c) && isFinite(a)) {
			this.callParent(arguments);
			this.el.dom.setAttribute("viewBox", [b, d, c, a].join(" "))
		}
	},
	render : function(c) {
		var f = this;
		if (!f.el) {
			var e = f.width || 10, b = f.height || 10, d = f.createSvgElement(
					"svg", {
						xmlns : "http://www.w3.org/2000/svg",
						version : 1.1,
						width : e,
						height : b
					}), a = f.getDefs(), g = f.createSvgElement("rect", {
						width : "100%",
						height : "100%",
						fill : "#000",
						stroke : "none",
						opacity : 0
					}), h;
			if (Ext.isSafari3) {
				h = f.createSvgElement("rect", {
							x : -10,
							y : -10,
							width : "110%",
							height : "110%",
							fill : "none",
							stroke : "#000"
						})
			}
			d.appendChild(a);
			if (Ext.isSafari3) {
				d.appendChild(h)
			}
			d.appendChild(g);
			c.appendChild(d);
			f.el = Ext.get(d);
			f.bgRect = Ext.get(g);
			if (Ext.isSafari3) {
				f.webkitRect = Ext.get(h);
				f.webkitRect.hide()
			}
			f.el.on({
						scope : f,
						mouseup : f.onMouseUp,
						mousedown : f.onMouseDown,
						mouseover : f.onMouseOver,
						mouseout : f.onMouseOut,
						mousemove : f.onMouseMove,
						mouseenter : f.onMouseEnter,
						mouseleave : f.onMouseLeave,
						click : f.onClick
					})
		}
		f.renderAll()
	},
	onMouseEnter : function(a) {
		if (this.el.parent().getRegion().contains(a.getPoint())) {
			this.fireEvent("mouseenter", a)
		}
	},
	onMouseLeave : function(a) {
		if (!this.el.parent().getRegion().contains(a.getPoint())) {
			this.fireEvent("mouseleave", a)
		}
	},
	processEvent : function(b, f) {
		var d = f.getTarget(), a = this.surface, c;
		this.fireEvent(b, f);
		if (d.nodeName == "tspan" && d.parentNode) {
			d = d.parentNode
		}
		c = this.items.get(d.id);
		if (c) {
			c.fireEvent(b, c, f)
		}
	},
	tuneText : function(h, j) {
		var a = h.el.dom, b = [], l, g, k, d, e, c, f;
		if (j.hasOwnProperty("text")) {
			b = this.setText(h, j.text)
		}
		if (b.length) {
			l = this.getBBoxText(h).height;
			for (d = 0, e = b.length; d < e; d++) {
				f = (Ext.isFF3_0 || Ext.isFF3_5) ? 2 : 4;
				b[d].setAttribute("dy", d ? l * 1.2 : l / f)
			}
			h.dirty = true
		}
	},
	setText : function(k, d) {
		var g = this, a = k.el.dom, j = a.getAttribute("x"), b = [], m, h, l, e, f, c;
		while (a.firstChild) {
			a.removeChild(a.firstChild)
		}
		c = String(d).split("\n");
		for (e = 0, f = c.length; e < f; e++) {
			l = c[e];
			if (l) {
				h = g.createSvgElement("tspan");
				h.appendChild(document.createTextNode(Ext.htmlDecode(l)));
				h.setAttribute("x", j);
				a.appendChild(h);
				b[e] = h
			}
		}
		return b
	},
	renderAll : function() {
		this.items.each(this.renderItem, this)
	},
	renderItem : function(a) {
		if (!this.el) {
			return
		}
		if (!a.el) {
			this.createSpriteElement(a)
		}
		if (a.zIndexDirty) {
			this.applyZIndex(a)
		}
		if (a.dirty) {
			this.applyAttrs(a);
			this.applyTransformations(a)
		}
	},
	redraw : function(a) {
		a.dirty = a.zIndexDirty = true;
		this.renderItem(a)
	},
	applyAttrs : function(o) {
		var j = this, c = o.el, n = o.group, g = o.attr, e, f, h, m, d, l, b, a, k;
		if (n) {
			e = [].concat(n);
			h = e.length;
			for (f = 0; f < h; f++) {
				n = e[f];
				j.getGroup(n).add(o)
			}
			delete o.group
		}
		m = j.scrubAttrs(o) || {};
		o.bbox.plain = 0;
		o.bbox.transform = 0;
		if (o.type == "circle" || o.type == "ellipse") {
			m.cx = m.cx || m.x;
			m.cy = m.cy || m.y
		} else {
			if (o.type == "rect") {
				m.rx = m.ry = m.r
			} else {
				if (o.type == "path" && m.d) {
					m.d = Ext.draw.Draw.pathToAbsolute(m.d)
				}
			}
		}
		o.dirtyPath = false;
		if (m["clip-rect"]) {
			j.setClip(o, m);
			delete m["clip-rect"]
		}
		if (o.type == "text" && m.font && o.dirtyFont) {
			c.set({
						style : "font: " + m.font
					});
			o.dirtyFont = false
		}
		if (o.type == "image") {
			c.dom.setAttributeNS(j.xlink, "href", m.src)
		}
		Ext.applyIf(m, j.minDefaults[o.type]);
		if (o.dirtyHidden) {
			(g.hidden) ? j.hidePrim(o) : j.showPrim(o);
			o.dirtyHidden = false
		}
		for (l in m) {
			if (m.hasOwnProperty(l) && m[l] != null) {
				c.dom.setAttribute(l, String(m[l]))
			}
		}
		if (o.type == "text") {
			j.tuneText(o, m)
		}
		b = g.style;
		if (b) {
			c.setStyle(b)
		}
		o.dirty = false;
		if (Ext.isSafari3) {
			j.webkitRect.show();
			setTimeout(function() {
						j.webkitRect.hide()
					})
		}
	},
	setClip : function(b, f) {
		var e = this, d = f["clip-rect"], a, c;
		if (d) {
			if (b.clip) {
				b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)
			}
			a = e.createSvgElement("clipPath");
			c = e.createSvgElement("rect");
			a.id = Ext.id(null, "ext-clip-");
			c.setAttribute("x", d.x);
			c.setAttribute("y", d.y);
			c.setAttribute("width", d.width);
			c.setAttribute("height", d.height);
			a.appendChild(c);
			e.getDefs().appendChild(a);
			b.el.dom.setAttribute("clip-path", "url(#" + a.id + ")");
			b.clip = c
		}
	},
	applyZIndex : function(c) {
		var a = this.normalizeSpriteCollection(c), d = c.el, b;
		if (this.el.dom.childNodes[a + 2] !== d.dom) {
			if (a > 0) {
				do {
					b = this.items.getAt(--a).el
				} while (!b && a > 0)
			}
			d.insertAfter(b || this.bgRect)
		}
		c.zIndexDirty = false
	},
	createItem : function(a) {
		var b = Ext.create("Ext.draw.Sprite", a);
		b.surface = this;
		return b
	},
	addGradient : function(g) {
		g = Ext.draw.Draw.parseGradient(g);
		var e = g.stops.length, a = g.vector, b, d, f, c;
		if (g.type == "linear") {
			b = this.createSvgElement("linearGradient");
			b.setAttribute("x1", a[0]);
			b.setAttribute("y1", a[1]);
			b.setAttribute("x2", a[2]);
			b.setAttribute("y2", a[3])
		} else {
			b = this.createSvgElement("radialGradient");
			b.setAttribute("cx", g.centerX);
			b.setAttribute("cy", g.centerY);
			b.setAttribute("r", g.radius);
			if (Ext.isNumber(g.focalX) && Ext.isNumber(g.focalY)) {
				b.setAttribute("fx", g.focalX);
				b.setAttribute("fy", g.focalY)
			}
		}
		b.id = g.id;
		this.getDefs().appendChild(b);
		for (c = 0; c < e; c++) {
			d = g.stops[c];
			f = this.createSvgElement("stop");
			f.setAttribute("offset", d.offset + "%");
			f.setAttribute("stop-color", d.color);
			f.setAttribute("stop-opacity", d.opacity);
			b.appendChild(f)
		}
	},
	hasCls : function(a, b) {
		return b
				&& (" " + (a.el.dom.getAttribute("class") || "") + " ")
						.indexOf(" " + b + " ") != -1
	},
	addCls : function(e, g) {
		var f = e.el, d, a, c, b = [], h = f.getAttribute("class") || "";
		if (!Ext.isArray(g)) {
			if (typeof g == "string" && !this.hasCls(e, g)) {
				f.set({
							"class" : h + " " + g
						})
			}
		} else {
			for (d = 0, a = g.length; d < a; d++) {
				c = g[d];
				if (typeof c == "string"
						&& (" " + h + " ").indexOf(" " + c + " ") == -1) {
					b.push(c)
				}
			}
			if (b.length) {
				f.set({
							"class" : " " + b.join(" ")
						})
			}
		}
	},
	removeCls : function(j, f) {
		var g = this, b = j.el, d = b.getAttribute("class") || "", c, h, e, k, a;
		if (!Ext.isArray(f)) {
			f = [f]
		}
		if (d) {
			a = d.replace(g.trimRe, " ").split(g.spacesRe);
			for (c = 0, e = f.length; c < e; c++) {
				k = f[c];
				if (typeof k == "string") {
					k = k.replace(g.trimRe, "");
					h = Ext.Array.indexOf(a, k);
					if (h != -1) {
						a.splice(h, 1)
					}
				}
			}
			b.set({
						"class" : a.join(" ")
					})
		}
	},
	destroy : function() {
		var a = this;
		a.callParent();
		if (a.el) {
			a.el.remove()
		}
		delete a.el
	}
});
Ext.define("Ext.draw.engine.Vml", {
	extend : "Ext.draw.Surface",
	requires : ["Ext.draw.Draw", "Ext.draw.Color", "Ext.draw.Sprite",
			"Ext.draw.Matrix", "Ext.core.Element"],
	engine : "Vml",
	map : {
		M : "m",
		L : "l",
		C : "c",
		Z : "x",
		m : "t",
		l : "r",
		c : "v",
		z : "x"
	},
	bitesRe : /([clmz]),?([^clmz]*)/gi,
	valRe : /-?[^,\s-]+/g,
	fillUrlRe : /^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,
	pathlike : /^(path|rect)$/,
	NonVmlPathRe : /[ahqstv]/ig,
	partialPathRe : /[clmz]/g,
	fontFamilyRe : /^['"]+|['"]+$/g,
	baseVmlCls : Ext.baseCSSPrefix + "vml-base",
	vmlGroupCls : Ext.baseCSSPrefix + "vml-group",
	spriteCls : Ext.baseCSSPrefix + "vml-sprite",
	measureSpanCls : Ext.baseCSSPrefix + "vml-measure-span",
	zoom : 21600,
	coordsize : 1000,
	coordorigin : "0 0",
	path2vml : function(s) {
		var m = this, t = m.NonVmlPathRe, b = m.map, e = m.valRe, q = m.zoom, d = m.bitesRe, f = Ext.Function
				.bind(Ext.draw.Draw.pathToAbsolute, Ext.draw.Draw), l, n, c, a, h, o, g, k;
		if (String(s).match(t)) {
			f = Ext.Function.bind(Ext.draw.Draw.path2curve, Ext.draw.Draw)
		} else {
			if (!String(s).match(m.partialPathRe)) {
				l = String(s).replace(d, function(r, v, j) {
							var u = [], i = v.toLowerCase() == "m", p = b[v];
							j.replace(e, function(w) {
										if (i && u[length] == 2) {
											p += u + b[v == "m" ? "l" : "L"];
											u = []
										}
										u.push(Math.round(w * q))
									});
							return p + u
						});
				return l
			}
		}
		n = f(s);
		l = [];
		for (h = 0, o = n.length; h < o; h++) {
			c = n[h];
			a = n[h][0].toLowerCase();
			if (a == "z") {
				a = "x"
			}
			for (g = 1, k = c.length; g < k; g++) {
				a += Math.round(c[g] * m.zoom) + (g != k - 1 ? "," : "")
			}
			l.push(a)
		}
		return l.join(" ")
	},
	translateAttrs : {
		radius : "r",
		radiusX : "rx",
		radiusY : "ry",
		lineWidth : "stroke-width",
		fillOpacity : "fill-opacity",
		strokeOpacity : "stroke-opacity",
		strokeLinejoin : "stroke-linejoin"
	},
	minDefaults : {
		circle : {
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		ellipse : {
			cx : 0,
			cy : 0,
			rx : 0,
			ry : 0,
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		rect : {
			x : 0,
			y : 0,
			width : 0,
			height : 0,
			rx : 0,
			ry : 0,
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		text : {
			x : 0,
			y : 0,
			"text-anchor" : "start",
			font : '10px "Arial"',
			fill : "#000",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		path : {
			d : "M0,0",
			fill : "none",
			stroke : null,
			"stroke-width" : null,
			opacity : null,
			"fill-opacity" : null,
			"stroke-opacity" : null
		},
		image : {
			x : 0,
			y : 0,
			width : 0,
			height : 0,
			preserveAspectRatio : "none",
			opacity : null
		}
	},
	onMouseEnter : function(a) {
		this.fireEvent("mouseenter", a)
	},
	onMouseLeave : function(a) {
		this.fireEvent("mouseleave", a)
	},
	processEvent : function(b, f) {
		var d = f.getTarget(), a = this.surface, c;
		this.fireEvent(b, f);
		c = this.items.get(d.id);
		if (c) {
			c.fireEvent(b, c, f)
		}
	},
	createSpriteElement : function(g) {
		var e = this, d = g.attr, f = g.type, i = e.zoom, b = g.vml
				|| (g.vml = {}), j = Math.round, c = (f === "image") ? e
				.createNode("image") : e.createNode("shape"), k, h, a;
		c.coordsize = i + " " + i;
		c.coordorigin = d.coordorigin || "0 0";
		Ext.get(c).addCls(e.spriteCls);
		if (f == "text") {
			b.path = k = e.createNode("path");
			k.textpathok = true;
			b.textpath = a = e.createNode("textpath");
			a.on = true;
			c.appendChild(a);
			c.appendChild(k)
		}
		c.id = g.id;
		g.el = Ext.get(c);
		e.el.appendChild(c);
		if (f !== "image") {
			h = e.createNode("skew");
			h.on = true;
			c.appendChild(h);
			g.skew = h
		}
		g.matrix = Ext.create("Ext.draw.Matrix");
		g.bbox = {
			plain : null,
			transform : null
		};
		g.fireEvent("render", g);
		return g.el
	},
	getBBox : function(a, b) {
		var c = this["getPath" + a.type](a);
		if (b) {
			a.bbox.plain = a.bbox.plain || Ext.draw.Draw.pathDimensions(c);
			return a.bbox.plain
		}
		a.bbox.transform = a.bbox.transform
				|| Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,
						a.matrix));
		return a.bbox.transform
	},
	getBBoxText : function(b) {
		var a = b.vml;
		return {
			x : a.X + (a.bbx || 0) - a.W / 2,
			y : a.Y - a.H / 2,
			width : a.W,
			height : a.H
		}
	},
	applyAttrs : function(m) {
		var s = this, d = m.vml, j = m.group, b = m.attr, c = m.el, o = c.dom, p, u, r, n, k, q, l, t, a;
		if (j) {
			r = [].concat(j);
			k = r.length;
			for (n = 0; n < k; n++) {
				j = r[n];
				s.getGroup(j).add(m)
			}
			delete m.group
		}
		q = s.scrubAttrs(m) || {};
		if (m.zIndexDirty) {
			s.setZIndex(m)
		}
		Ext.applyIf(q, s.minDefaults[m.type]);
		if (m.type == "image") {
			Ext.apply(m.attr, {
						x : q.x,
						y : q.y,
						width : q.width,
						height : q.height
					});
			a = m.getBBox();
			c.setStyle({
						width : a.width + "px",
						height : a.height + "px"
					});
			o.src = q.src
		}
		if (o.href) {
			o.href = q.href
		}
		if (o.title) {
			o.title = q.title
		}
		if (o.target) {
			o.target = q.target
		}
		if (o.cursor) {
			o.cursor = q.cursor
		}
		if (m.dirtyHidden) {
			(q.hidden) ? s.hidePrim(m) : s.showPrim(m);
			m.dirtyHidden = false
		}
		if (m.dirtyPath) {
			if (m.type == "circle" || m.type == "ellipse") {
				var f = q.x, e = q.y, h = q.rx || q.r || 0, g = q.ry || q.r
						|| 0;
				o.path = Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",
						Math.round((f - h) * s.zoom), Math.round((e - g)
								* s.zoom), Math.round((f + h) * s.zoom), Math
								.round((e + g) * s.zoom), Math
								.round(f * s.zoom));
				m.dirtyPath = false
			} else {
				if (m.type !== "text" && m.type !== "image") {
					m.attr.path = q.path = s.setPaths(m, q) || q.path;
					o.path = s.path2vml(q.path);
					m.dirtyPath = false
				}
			}
		}
		if ("clip-rect" in q) {
			s.setClip(m, q)
		}
		if (m.type == "text") {
			s.setTextAttributes(m, q)
		}
		if (q.opacity || q["stroke-opacity"] || q.fill) {
			s.setFill(m, q)
		}
		if (q.stroke || q["stroke-opacity"] || q.fill) {
			s.setStroke(m, q)
		}
		p = b.style;
		if (p) {
			c.setStyle(p)
		}
		m.dirty = false
	},
	setZIndex : function(a) {
		if (a.el) {
			if (a.attr.zIndex != undefined) {
				a.el.setStyle("zIndex", a.attr.zIndex)
			}
			a.zIndexDirty = false
		}
	},
	setPaths : function(b, c) {
		var a = b.attr;
		b.bbox.plain = null;
		b.bbox.transform = null;
		if (b.type == "circle") {
			a.rx = a.ry = c.r;
			return Ext.draw.Draw.ellipsePath(b)
		} else {
			if (b.type == "ellipse") {
				a.rx = c.rx;
				a.ry = c.ry;
				return Ext.draw.Draw.ellipsePath(b)
			} else {
				if (b.type == "rect") {
					a.rx = a.ry = c.r;
					return Ext.draw.Draw.rectPath(b)
				} else {
					if (b.type == "path" && a.path) {
						return Ext.draw.Draw.pathToAbsolute(a.path)
					}
				}
			}
		}
		return false
	},
	setFill : function(j, e) {
		var g = this, c = j.el.dom, i = c.fill, b = false, f, h, a, k, d;
		if (!i) {
			i = c.fill = g.createNode("fill");
			b = true
		}
		if (Ext.isArray(e.fill)) {
			e.fill = e.fill[0]
		}
		if (e.fill == "none") {
			i.on = false
		} else {
			if (typeof e.opacity == "number") {
				i.opacity = e.opacity
			}
			if (typeof e["fill-opacity"] == "number") {
				i.opacity = e["fill-opacity"]
			}
			i.on = true;
			if (typeof e.fill == "string") {
				a = e.fill.match(g.fillUrlRe);
				if (a) {
					a = a[1];
					if (a.charAt(0) == "#") {
						h = g.gradientsColl.getByKey(a.substring(1))
					}
					if (h) {
						k = e.rotation;
						d = -(h.angle + 270 + (k ? k.degrees : 0)) % 360;
						if (d === 0) {
							d = 180
						}
						i.angle = d;
						i.type = "gradient";
						i.method = "sigma";
						i.colors.value = h.colors
					} else {
						i.src = a;
						i.type = "tile"
					}
				} else {
					i.color = Ext.draw.Color.toHex(e.fill);
					i.src = "";
					i.type = "solid"
				}
			}
		}
		if (b) {
			c.appendChild(i)
		}
	},
	setStroke : function(b, g) {
		var e = this, d = b.el.dom, h = b.strokeEl, f = false, c, a;
		if (!h) {
			h = b.strokeEl = e.createNode("stroke");
			f = true
		}
		if (Ext.isArray(g.stroke)) {
			g.stroke = g.stroke[0]
		}
		if (!g.stroke || g.stroke == "none" || g.stroke == 0
				|| g["stroke-width"] == 0) {
			h.on = false
		} else {
			h.on = true;
			if (g.stroke && !g.stroke.match(e.fillUrlRe)) {
				h.color = Ext.draw.Color.toHex(g.stroke)
			}
			h.joinstyle = g["stroke-linejoin"];
			h.endcap = g["stroke-linecap"] || "round";
			h.miterlimit = g["stroke-miterlimit"] || 8;
			c = parseFloat(g["stroke-width"] || 1) * 0.75;
			a = g["stroke-opacity"] || 1;
			if (Ext.isNumber(c) && c < 1) {
				h.weight = 1;
				h.opacity = a * c
			} else {
				h.weight = c;
				h.opacity = a
			}
		}
		if (f) {
			d.appendChild(h)
		}
	},
	setClip : function(b, f) {
		var e = this, c = b.el, a = b.clipEl, d = String(f["clip-rect"])
				.split(e.separatorRe);
		if (!a) {
			a = b.clipEl = e.el.insertFirst(Ext.getDoc().dom
					.createElement("div"));
			a.addCls(Ext.baseCSSPrefix + "vml-sprite")
		}
		if (d.length == 4) {
			d[2] = +d[2] + (+d[0]);
			d[3] = +d[3] + (+d[1]);
			a.setStyle("clip", Ext.String.format(
							"rect({1}px {2}px {3}px {0}px)", d[0], d[1], d[2],
							d[3]));
			a.setSize(e.el.width, e.el.height)
		} else {
			a.setStyle("clip", "")
		}
	},
	setTextAttributes : function(h, c) {
		var g = this, a = h.vml, e = a.textpath.style, f = g.span.style, i = g.zoom, j = Math.round, k = {
			fontSize : "font-size",
			fontWeight : "font-weight",
			fontStyle : "font-style"
		}, b, d;
		if (h.dirtyFont) {
			if (c.font) {
				e.font = f.font = c.font
			}
			if (c["font-family"]) {
				e.fontFamily = '"'
						+ c["font-family"].split(",")[0].replace(
								g.fontFamilyRe, "") + '"';
				f.fontFamily = c["font-family"]
			}
			for (b in k) {
				d = c[k[b]];
				if (d) {
					e[b] = f[b] = d
				}
			}
			g.setText(h, c.text);
			if (a.textpath.string) {
				g.span.innerHTML = String(a.textpath.string).replace(/</g,
						"&#60;").replace(/&/g, "&#38;").replace(/\n/g, "<br>")
			}
			a.W = g.span.offsetWidth;
			a.H = g.span.offsetHeight + 2;
			if (c["text-anchor"] == "middle") {
				e["v-text-align"] = "center"
			} else {
				if (c["text-anchor"] == "end") {
					e["v-text-align"] = "right";
					a.bbx = -Math.round(a.W / 2)
				} else {
					e["v-text-align"] = "left";
					a.bbx = Math.round(a.W / 2)
				}
			}
		}
		a.X = c.x;
		a.Y = c.y;
		a.path.v = Ext.String.format("m{0},{1}l{2},{1}", Math.round(a.X * i),
				Math.round(a.Y * i), Math.round(a.X * i) + 1);
		h.bbox.plain = null;
		h.bbox.transform = null;
		h.dirtyFont = false
	},
	setText : function(a, b) {
		a.vml.textpath.string = Ext.htmlDecode(b)
	},
	hide : function() {
		this.el.hide()
	},
	show : function() {
		this.el.show()
	},
	hidePrim : function(a) {
		a.el.addCls(Ext.baseCSSPrefix + "hide-visibility")
	},
	showPrim : function(a) {
		a.el.removeCls(Ext.baseCSSPrefix + "hide-visibility")
	},
	setSize : function(a, m) {
		var h = this, q = h.viewBox, l, k, f, c, e;
		a = a || h.width;
		m = m || h.height;
		h.width = a;
		h.height = m;
		if (!h.el) {
			return
		}
		if (a != undefined) {
			h.el.setWidth(a)
		}
		if (m != undefined) {
			h.el.setHeight(m)
		}
		if (q && (a || m)) {
			var j = q.x, g = q.y, o = q.width, b = q.height, n = m / b, d = a
					/ o, p;
			if (o * n < a) {
				j -= (a - o * n) / 2 / n
			}
			if (b * d < m) {
				g -= (m - b * d) / 2 / d
			}
			p = 1 / Math.max(o / a, b / m);
			h.viewBoxShift = {
				dx : -j,
				dy : -g,
				scale : p
			};
			f = h.items.items;
			for (c = 0, e = f.length; c < e; c++) {
				h.transform(f[c])
			}
		}
		this.callParent(arguments)
	},
	setViewBox : function(b, d, c, a) {
		this.callParent(arguments);
		this.viewBox = {
			x : b,
			y : d,
			width : c,
			height : a
		}
	},
	onAdd : function(a) {
		this.callParent(arguments);
		if (this.el) {
			this.renderItem(a)
		}
	},
	onRemove : function(a) {
		if (a.el) {
			a.el.remove();
			delete a.el
		}
		this.callParent(arguments)
	},
	render : function(a) {
		var c = this, f = Ext.getDoc().dom;
		if (!c.createNode) {
			try {
				if (!f.namespaces.rvml) {
					f.namespaces.add("rvml", "urn:schemas-microsoft-com:vml")
				}
				c.createNode = function(e) {
					return f.createElement("<rvml:" + e + ' class="rvml">')
				}
			} catch (d) {
				c.createNode = function(e) {
					return f
							.createElement("<"
									+ e
									+ ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')
				}
			}
		}
		if (!c.el) {
			var b = f.createElement("div");
			c.el = Ext.get(b);
			c.el.addCls(c.baseVmlCls);
			c.span = f.createElement("span");
			Ext.get(c.span).addCls(c.measureSpanCls);
			b.appendChild(c.span);
			c.el.setSize(c.width || 10, c.height || 10);
			a.appendChild(b);
			c.el.on({
						scope : c,
						mouseup : c.onMouseUp,
						mousedown : c.onMouseDown,
						mouseover : c.onMouseOver,
						mouseout : c.onMouseOut,
						mousemove : c.onMouseMove,
						mouseenter : c.onMouseEnter,
						mouseleave : c.onMouseLeave,
						click : c.onClick
					})
		}
		c.renderAll()
	},
	renderAll : function() {
		this.items.each(this.renderItem, this)
	},
	redraw : function(a) {
		a.dirty = true;
		this.renderItem(a)
	},
	renderItem : function(a) {
		if (!this.el) {
			return
		}
		if (!a.el) {
			this.createSpriteElement(a)
		}
		if (a.dirty) {
			this.applyAttrs(a);
			if (a.dirtyTransform) {
				this.applyTransformations(a)
			}
		}
	},
	rotationCompensation : function(d, c, a) {
		var b = Ext.create("Ext.draw.Matrix");
		b.rotate(-d, 0.5, 0.5);
		return {
			x : b.x(c, a),
			y : b.y(c, a)
		}
	},
	transform : function(s) {
		var B = this, v = Ext.create("Ext.draw.Matrix"), l = s.transformations, q = l.length, w = 0, j = 0, c = 1, b = 1, h = "", e = s.el, x = e.dom, t = x.style, a = B.zoom, f = s.skew, A, z, n, g, m, k, u, r, p, o, d;
		for (; w < q; w++) {
			n = l[w];
			g = n.type;
			if (g == "translate") {
				v.translate(n.x, n.y)
			} else {
				if (g == "rotate") {
					v.rotate(n.degrees, n.x, n.y);
					j += n.degrees
				} else {
					if (g == "scale") {
						v.scale(n.x, n.y, n.centerX, n.centerY);
						c *= n.x;
						b *= n.y
					}
				}
			}
		}
		if (B.viewBoxShift) {
			v.scale(B.viewBoxShift.scale, B.viewBoxShift.scale, -1, -1);
			v.add(1, 0, 0, 1, B.viewBoxShift.dx, B.viewBoxShift.dy)
		}
		s.matrix = v;
		if (s.type != "image" && f) {
			f.matrix = v.toString();
			f.offset = v.offset()
		} else {
			A = v.matrix[0][2];
			z = v.matrix[1][2];
			p = a / c;
			o = a / b;
			x.coordsize = Math.abs(p) + " " + Math.abs(o);
			r = j * (c * ((b < 0) ? -1 : 1));
			if (r != t.rotation && !(r === 0 && !t.rotation)) {
				t.rotation = r
			}
			if (j) {
				m = B.rotationCompensation(j, A, z);
				A = m.x;
				z = m.y
			}
			if (c < 0) {
				h += "x"
			}
			if (b < 0) {
				h += " y";
				k = -1
			}
			if (h != "" && !x.style.flip) {
				t.flip = h
			}
			d = (A * -p) + " " + (z * -o);
			if (d != x.coordorigin) {
				x.coordorigin = (A * -p) + " " + (z * -o)
			}
		}
	},
	createItem : function(a) {
		return Ext.create("Ext.draw.Sprite", a)
	},
	getRegion : function() {
		return this.el.getRegion()
	},
	addCls : function(a, b) {
		if (a && a.el) {
			a.el.addCls(b)
		}
	},
	removeCls : function(a, b) {
		if (a && a.el) {
			a.el.removeCls(b)
		}
	},
	addGradient : function(d) {
		var a = this.gradientsColl
				|| (this.gradientsColl = Ext.create("Ext.util.MixedCollection")), b = [], c = Ext
				.create("Ext.util.MixedCollection");
		c.addAll(d.stops);
		c.sortByKey("ASC", function(f, e) {
					f = parseInt(f, 10);
					e = parseInt(e, 10);
					return f > e ? 1 : (f < e ? -1 : 0)
				});
		c.eachKey(function(f, e) {
					b.push(f + "% " + e.color)
				});
		a.add(d.id, {
					colors : b.join(","),
					angle : d.angle
				})
	},
	destroy : function() {
		var a = this;
		a.callParent(arguments);
		if (a.el) {
			a.el.remove()
		}
		delete a.el
	}
});
Ext.define("Ext.grid.header.DragZone", {
			extend : "Ext.dd.DragZone",
			colHeaderCls : Ext.baseCSSPrefix + "column-header",
			maxProxyWidth : 120,
			constructor : function(a) {
				this.headerCt = a;
				this.ddGroup = this.getDDGroup();
				this.callParent([a.el]);
				this.proxy.el.addCls(Ext.baseCSSPrefix + "grid-col-dd")
			},
			getDDGroup : function() {
				return "header-dd-zone-"
						+ this.headerCt.up("[scrollerOwner]").id
			},
			getDragData : function(b) {
				var d = b.getTarget("." + this.colHeaderCls), a;
				if (d) {
					a = Ext.getCmp(d.id);
					if (!this.headerCt.dragging && a.draggable
							&& !(a.isOnLeftEdge(b) || a.isOnRightEdge(b))) {
						var c = document.createElement("div");
						c.innerHTML = Ext.getCmp(d.id).text;
						return {
							ddel : c,
							header : a
						}
					}
				}
				return false
			},
			onBeforeDrag : function() {
				return !(this.headerCt.dragging || this.disabled)
			},
			onInitDrag : function() {
				this.headerCt.dragging = true;
				this.callParent(arguments)
			},
			onDragDrop : function() {
				this.headerCt.dragging = false;
				this.callParent(arguments)
			},
			afterRepair : function() {
				this.callParent();
				this.headerCt.dragging = false
			},
			getRepairXY : function() {
				return this.dragData.header.el.getXY()
			},
			disable : function() {
				this.disabled = true
			},
			enable : function() {
				this.disabled = false
			}
		});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.StartMenu", {
			extend : "Ext.panel.Panel",
			requires : ["Ext.menu.Menu", "Ext.toolbar.Toolbar"],
			ariaRole : "menu",
			cls : "x-menu ux-start-menu",
			defaultAlign : "bl-tl",
			iconCls : "user",
			floating : true,
			shadow : true,
			width : 300,
			initComponent : function() {
				var a = this, b = a.menu;
				a.menu = new Ext.menu.Menu({
							cls : "ux-start-menu-body",
							border : false,
							floating : false,
							items : b
						});
				a.menu.layout.align = "stretch";
				a.items = [a.menu];
				a.layout = "fit";
				Ext.menu.Manager.register(a);
				a.callParent();
				a.toolbar = new Ext.toolbar.Toolbar(Ext.apply({
							dock : "right",
							cls : "ux-start-menu-toolbar",
							vertical : true,
							width : 100
						}, a.toolConfig));
				a.toolbar.layout.align = "stretch";
				a.addDocked(a.toolbar);
				delete a.toolItems;
				a.on("deactivate", function() {
							a.hide()
						})
			},
			addMenuItem : function() {
				var a = this.menu;
				a.add.apply(a, arguments)
			},
			addToolItem : function() {
				var a = this.toolbar;
				a.add.apply(a, arguments)
			},
			showBy : function(c, f, e) {
				var b = this;
				if (b.floating && c) {
					b.layout.autoSize = true;
					b.show();
					c = c.el || c;
					var d = b.el.getAlignToXY(c, f || b.defaultAlign, e);
					if (b.floatParent) {
						var a = b.floatParent.getTargetEl().getViewRegion();
						d[0] -= a.x;
						d[1] -= a.y
					}
					b.showAt(d);
					b.doConstrain()
				}
				return b
			}
		});
/*
 * Ext JS Library 4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.define("Ext.ux.desktop.TaskBar", {
			extend : "Ext.toolbar.Toolbar",
			requires : ["Ext.button.Button", "Ext.resizer.Splitter",
					"Ext.menu.Menu", "Ext.ux.desktop.StartMenu"],
			alias : "widget.taskbar",
			cls : "ux-taskbar",
			startBtnText : "Start",
			initComponent : function() {
				var a = this;
				a.startMenu = new Ext.ux.desktop.StartMenu(a.startConfig);
				a.quickStart = new Ext.toolbar.Toolbar(a.getQuickStart());
				a.windowBar = new Ext.toolbar.Toolbar(a.getWindowBarConfig());
				a.tray = new Ext.toolbar.Toolbar(a.getTrayConfig());
				a.items = [{
							xtype : "button",
							cls : "ux-start-button",
							iconCls : "ux-start-button-icon",
							menu : a.startMenu,
							menuAlign : "bl-tl",
							text : a.startBtnText
						}, a.quickStart, {
							xtype : "splitter",
							html : "&#160;",
							height : 14,
							width : 2,
							cls : "x-toolbar-separator x-toolbar-separator-horizontal"
						}, a.windowBar, "-", a.tray];
				a.callParent()
			},
			afterLayout : function() {
				var a = this;
				a.callParent();
				a.windowBar.el.on("contextmenu", a.onButtonContextMenu, a)
			},
			getQuickStart : function() {
				var b = this, a = {
					minWidth : 20,
					width : 60,
					items : [],
					enableOverflow : true
				};
				Ext.each(this.quickStart, function(c) {
							a.items.push({
										tooltip : {
											text : c.name,
											align : "bl-tl"
										},
										overflowText : c.name,
										iconCls : c.iconCls,
										module : c.module,
										handler : b.onQuickStartClick,
										scope : b
									})
						});
				return a
			},
			getTrayConfig : function() {
				var a = {
					width : 80,
					items : this.trayItems
				};
				delete this.trayItems;
				return a
			},
			getWindowBarConfig : function() {
				return {
					flex : 1,
					cls : "ux-desktop-windowbar",
					items : ["&#160;"],
					layout : {
						overflowHandler : "Scroller"
					}
				}
			},
			getWindowBtnFromEl : function(a) {
				var b = this.windowBar.getChildByElement(a);
				return b || null
			},
			onQuickStartClick : function(b) {
				var a = this.app.getModule(b.module);
				if (a) {
					a.createWindow()
				}
			},
			onButtonContextMenu : function(d) {
				var c = this, b = d.getTarget(), a = c.getWindowBtnFromEl(b);
				if (a) {
					d.stopEvent();
					c.windowMenu.theWin = a.win;
					c.windowMenu.showBy(b)
				}
			},
			onWindowBtnClick : function(a) {
				var b = a.win;
				if (b.minimized || b.hidden) {
					b.show()
				} else {
					if (b.active) {
						b.minimize()
					} else {
						b.toFront()
					}
				}
			},
			addTaskButton : function(c) {
				var a = {
					iconCls : c.iconCls,
					enableToggle : true,
					toggleGroup : "all",
					width : 140,
					text : Ext.util.Format.ellipsis(c.title, 20),
					listeners : {
						click : this.onWindowBtnClick,
						scope : this
					},
					win : c
				};
				var b = this.windowBar.add(a);
				b.toggle(true);
				return b
			},
			removeTaskButton : function(a) {
				var c, b = this;
				b.windowBar.items.each(function(d) {
							if (d === a) {
								c = d
							}
							return !c
						});
				if (c) {
					b.windowBar.remove(c)
				}
				return c
			},
			setActiveButton : function(a) {
				if (a) {
					a.toggle(true)
				} else {
					this.windowBar.items.each(function(b) {
								if (b.isButton) {
									b.toggle(false)
								}
							})
				}
			}
		});
Ext.define("Ext.ux.desktop.TrayClock", {
			extend : "Ext.toolbar.TextItem",
			alias : "widget.trayclock",
			cls : "ux-desktop-trayclock",
			html : "&#160;",
			timeFormat : "g:i A",
			tpl : "{time}",
			initComponent : function() {
				var a = this;
				a.callParent();
				if (typeof(a.tpl) == "string") {
					a.tpl = new Ext.XTemplate(a.tpl)
				}
			},
			afterRender : function() {
				var a = this;
				Ext.Function.defer(a.updateTime, 100, a);
				a.callParent()
			},
			onDestroy : function() {
				var a = this;
				if (a.timer) {
					window.clearTimeout(a.timer);
					a.timer = null
				}
				a.callParent()
			},
			updateTime : function() {
				var a = this, b = Ext.Date.format(new Date(), a.timeFormat), c = a.tpl
						.apply({
									time : b
								});
				if (a.lastText != c) {
					a.setText(c);
					a.lastText = c
				}
				a.timer = Ext.Function.defer(a.updateTime, 10000, a)
			}
		});
Ext.define("Ext.dd.DropTarget", {
			extend : "Ext.dd.DDTarget",
			requires : ["Ext.dd.ScrollManager"],
			constructor : function(b, a) {
				this.el = Ext.get(b);
				Ext.apply(this, a);
				if (this.containerScroll) {
					Ext.dd.ScrollManager.register(this.el)
				}
				this.callParent([this.el.dom, this.ddGroup || this.group, {
							isTarget : true
						}])
			},
			dropAllowed : Ext.baseCSSPrefix + "dd-drop-ok",
			dropNotAllowed : Ext.baseCSSPrefix + "dd-drop-nodrop",
			isTarget : true,
			isNotifyTarget : true,
			notifyEnter : function(a, c, b) {
				if (this.overClass) {
					this.el.addCls(this.overClass)
				}
				return this.dropAllowed
			},
			notifyOver : function(a, c, b) {
				return this.dropAllowed
			},
			notifyOut : function(a, c, b) {
				if (this.overClass) {
					this.el.removeCls(this.overClass)
				}
			},
			notifyDrop : function(a, c, b) {
				return false
			},
			destroy : function() {
				this.callParent();
				if (this.containerScroll) {
					Ext.dd.ScrollManager.unregister(this.el)
				}
			}
		});
Ext.define("Ext.dd.DropZone", {
			extend : "Ext.dd.DropTarget",
			requires : ["Ext.dd.Registry"],
			getTargetFromEvent : function(a) {
				return Ext.dd.Registry.getTargetFromEvent(a)
			},
			onNodeEnter : function(d, a, c, b) {
			},
			onNodeOver : function(d, a, c, b) {
				return this.dropAllowed
			},
			onNodeOut : function(d, a, c, b) {
			},
			onNodeDrop : function(d, a, c, b) {
				return false
			},
			onContainerOver : function(a, c, b) {
				return this.dropNotAllowed
			},
			onContainerDrop : function(a, c, b) {
				return false
			},
			notifyEnter : function(a, c, b) {
				return this.dropNotAllowed
			},
			notifyOver : function(a, c, b) {
				var d = this.getTargetFromEvent(c);
				if (!d) {
					if (this.lastOverNode) {
						this.onNodeOut(this.lastOverNode, a, c, b);
						this.lastOverNode = null
					}
					return this.onContainerOver(a, c, b)
				}
				if (this.lastOverNode != d) {
					if (this.lastOverNode) {
						this.onNodeOut(this.lastOverNode, a, c, b)
					}
					this.onNodeEnter(d, a, c, b);
					this.lastOverNode = d
				}
				return this.onNodeOver(d, a, c, b)
			},
			notifyOut : function(a, c, b) {
				if (this.lastOverNode) {
					this.onNodeOut(this.lastOverNode, a, c, b);
					this.lastOverNode = null
				}
			},
			notifyDrop : function(a, c, b) {
				if (this.lastOverNode) {
					this.onNodeOut(this.lastOverNode, a, c, b);
					this.lastOverNode = null
				}
				var d = this.getTargetFromEvent(c);
				return d ? this.onNodeDrop(d, a, c, b) : this.onContainerDrop(
						a, c, b)
			},
			triggerCacheRefresh : function() {
				Ext.dd.DDM.refreshCache(this.groups)
			}
		});
Ext.define("Ext.grid.header.DropZone", {
	extend : "Ext.dd.DropZone",
	colHeaderCls : Ext.baseCSSPrefix + "column-header",
	proxyOffsets : [-4, -9],
	constructor : function(a) {
		this.headerCt = a;
		this.ddGroup = this.getDDGroup();
		this.callParent([a.el])
	},
	getDDGroup : function() {
		return "header-dd-zone-" + this.headerCt.up("[scrollerOwner]").id
	},
	getTargetFromEvent : function(a) {
		return a.getTarget("." + this.colHeaderCls)
	},
	getTopIndicator : function() {
		if (!this.topIndicator) {
			this.topIndicator = Ext.core.DomHelper.append(Ext.getBody(), {
						cls : "col-move-top",
						html : "&#160;"
					}, true)
		}
		return this.topIndicator
	},
	getBottomIndicator : function() {
		if (!this.bottomIndicator) {
			this.bottomIndicator = Ext.core.DomHelper.append(Ext.getBody(), {
						cls : "col-move-bottom",
						html : "&#160;"
					}, true)
		}
		return this.bottomIndicator
	},
	getLocation : function(d, b) {
		var a = d.getXY()[0], c = Ext.fly(b).getRegion(), g, f;
		if ((c.right - a) <= (c.right - c.left) / 2) {
			g = "after"
		} else {
			g = "before"
		}
		return {
			pos : g,
			header : Ext.getCmp(b.id),
			node : b
		}
	},
	positionIndicator : function(w, o, u) {
		var a = this.getLocation(u, o), q = a.header, g = a.pos, f = w
				.nextSibling("gridcolumn:not([hidden])"), t = w
				.previousSibling("gridcolumn:not([hidden])"), d, l, r, s, b, c, k, m, x, v;
		if (!q.draggable && q.getIndex() == 0) {
			return false
		}
		this.lastLocation = a;
		if ((w !== q)
				&& ((g === "before" && f !== q) || (g === "after" && t !== q))
				&& !q.isDescendantOf(w)) {
			var n = Ext.dd.DragDropManager.getRelated(this), j = n.length, p = 0, h;
			for (; p < j; p++) {
				h = n[p];
				if (h !== this && h.invalidateDrop) {
					h.invalidateDrop()
				}
			}
			this.valid = true;
			l = this.getTopIndicator();
			r = this.getBottomIndicator();
			if (g === "before") {
				s = "tl";
				b = "bl"
			} else {
				s = "tr";
				b = "br"
			}
			c = q.el.getAnchorXY(s);
			k = q.el.getAnchorXY(b);
			m = this.headerCt.el;
			x = m.getLeft();
			v = m.getRight();
			c[0] = Ext.Number.constrain(c[0], x, v);
			k[0] = Ext.Number.constrain(k[0], x, v);
			c[0] -= 4;
			c[1] -= 9;
			k[0] -= 4;
			l.setXY(c);
			r.setXY(k);
			l.show();
			r.show()
		} else {
			this.invalidateDrop()
		}
	},
	invalidateDrop : function() {
		this.valid = false;
		this.hideIndicators()
	},
	onNodeOver : function(b, a, d, c) {
		if (c.header.el.dom !== b) {
			this.positionIndicator(c.header, b, d)
		}
		return this.valid ? this.dropAllowed : this.dropNotAllowed
	},
	hideIndicators : function() {
		this.getTopIndicator().hide();
		this.getBottomIndicator().hide()
	},
	onNodeOut : function() {
		this.hideIndicators()
	},
	onNodeDrop : function(d, k, j, f) {
		if (this.valid) {
			this.invalidateDrop();
			var h = f.header, g = this.lastLocation, m = h.ownerCt, a = m.items
					.indexOf(h), i = g.header.ownerCt, n = i.items
					.indexOf(g.header), c = this.headerCt, l, b;
			if (g.pos === "after") {
				n++
			}
			if (m !== i && m.lockableInjected && i.lockableInjected
					&& i.lockedCt) {
				b = m.up("[scrollerOwner]");
				b.lock(h, n)
			} else {
				if (m !== i && m.lockableInjected && i.lockableInjected
						&& m.lockedCt) {
					b = m.up("[scrollerOwner]");
					b.unlock(h, n)
				} else {
					if ((m === i) && (n > m.items.indexOf(h))) {
						n--
					}
					if (m !== i) {
						m.suspendLayout = true;
						m.remove(h, false);
						m.suspendLayout = false
					}
					if (m.isGroupHeader) {
						if (!m.items.getCount()) {
							l = m.ownerCt;
							l.suspendLayout = true;
							l.remove(m, false);
							m.el.dom.parentNode.removeChild(m.el.dom);
							l.suspendLayout = false
						} else {
							m.minWidth = m.getWidth() - h.getWidth();
							m.setWidth(m.minWidth)
						}
					}
					i.suspendLayout = true;
					if (m === i) {
						i.move(a, n)
					} else {
						i.insert(n, h)
					}
					i.suspendLayout = false;
					if (i.isGroupHeader) {
						h.savedFlex = h.flex;
						delete h.flex;
						h.width = h.getWidth();
						i.minWidth = i.getWidth() + h.getWidth()
								- (h.savedFlex ? 1 : 0);
						i.setWidth(i.minWidth)
					} else {
						if (h.savedFlex) {
							h.flex = h.savedFlex;
							delete h.width
						}
					}
					c.purgeCache();
					c.doLayout();
					c.onHeaderMoved(h, a, n);
					if (!m.items.getCount()) {
						m.destroy()
					}
				}
			}
		}
	}
});
Ext.define("Ext.grid.plugin.HeaderReorderer", {
			extend : "Ext.util.Observable",
			requires : ["Ext.grid.header.DragZone", "Ext.grid.header.DropZone"],
			alias : "plugin.gridheaderreorderer",
			init : function(a) {
				this.headerCt = a;
				a.on("render", this.onHeaderCtRender, this)
			},
			destroy : function() {
				Ext.destroy(this.dragZone, this.dropZone)
			},
			onHeaderCtRender : function() {
				this.dragZone = Ext.create("Ext.grid.header.DragZone",
						this.headerCt);
				this.dropZone = Ext.create("Ext.grid.header.DropZone",
						this.headerCt);
				if (this.disabled) {
					this.dragZone.disable()
				}
			},
			enable : function() {
				this.disabled = false;
				if (this.dragZone) {
					this.dragZone.enable()
				}
			},
			disable : function() {
				this.disabled = true;
				if (this.dragZone) {
					this.dragZone.disable()
				}
			}
		});
Ext.define("Ext.resizer.ResizeTracker", {
	extend : "Ext.dd.DragTracker",
	dynamic : true,
	preserveRatio : false,
	constrainTo : null,
	constructor : function(b) {
		var d = this;
		if (!b.el) {
			if (b.target.isComponent) {
				d.el = b.target.getEl()
			} else {
				d.el = b.target
			}
		}
		this.callParent(arguments);
		if (d.preserveRatio && d.minWidth && d.minHeight) {
			var c = d.minWidth / d.el.getWidth(), a = d.minHeight
					/ d.el.getHeight();
			if (a > c) {
				d.minWidth = d.el.getWidth() * a
			} else {
				d.minHeight = d.el.getHeight() * c
			}
		}
		if (d.throttle) {
			var e = Ext.Function.createThrottled(function() {
						Ext.resizer.ResizeTracker.prototype.resize.apply(d,
								arguments)
					}, d.throttle);
			d.resize = function(g, h, f) {
				if (f) {
					Ext.resizer.ResizeTracker.prototype.resize.apply(d,
							arguments)
				} else {
					e.apply(null, arguments)
				}
			}
		}
	},
	onBeforeStart : function(a) {
		this.startBox = this.el.getBox()
	},
	getDynamicTarget : function() {
		var a = this.target;
		if (this.dynamic) {
			return a
		} else {
			if (!this.proxy) {
				this.proxy = a.isComponent ? a.getProxy()
						.addCls(Ext.baseCSSPrefix + "resizable-proxy") : a
						.createProxy({
									tag : "div",
									cls : Ext.baseCSSPrefix + "resizable-proxy",
									id : a.id + "-rzproxy"
								}, Ext.getBody());
				this.proxy.removeCls(Ext.baseCSSPrefix + "proxy-el")
			}
		}
		this.proxy.show();
		return this.proxy
	},
	onStart : function(a) {
		this.activeResizeHandle = Ext.getCmp(this.getDragTarget().id);
		if (!this.dynamic) {
			this.resize(this.startBox, {
						horizontal : "none",
						vertical : "none"
					})
		}
	},
	onDrag : function(a) {
		if (this.dynamic || this.proxy) {
			this.updateDimensions(a)
		}
	},
	updateDimensions : function(p, k) {
		var q = this, c = q.activeResizeHandle.region, f = q
				.getOffset(q.constrainTo ? "dragTarget" : null), i = q.startBox, g, n = 0, r = 0, a = 0, t = 0, s, l = f[0] < 0
				? "right"
				: "left", o = f[1] < 0 ? "down" : "up", h, b;
		switch (c) {
			case "south" :
				r = f[1];
				b = 2;
				break;
			case "north" :
				r = -f[1];
				t = -r;
				b = 2;
				break;
			case "east" :
				n = f[0];
				b = 1;
				break;
			case "west" :
				n = -f[0];
				a = -n;
				b = 1;
				break;
			case "northeast" :
				r = -f[1];
				t = -r;
				n = f[0];
				h = [i.x, i.y + i.height];
				b = 3;
				break;
			case "southeast" :
				r = f[1];
				n = f[0];
				h = [i.x, i.y];
				b = 3;
				break;
			case "southwest" :
				n = -f[0];
				a = -n;
				r = f[1];
				h = [i.x + i.width, i.y];
				b = 3;
				break;
			case "northwest" :
				r = -f[1];
				t = -r;
				n = -f[0];
				a = -n;
				h = [i.x + i.width, i.y + i.height];
				b = 3;
				break
		}
		var d = {
			width : i.width + n,
			height : i.height + r,
			x : i.x + a,
			y : i.y + t
		};
		if (d.width < q.minWidth || d.width > q.maxWidth) {
			d.width = Ext.Number.constrain(d.width, q.minWidth, q.maxWidth);
			d.x = q.lastX || d.x
		} else {
			q.lastX = d.x
		}
		if (d.height < q.minHeight || d.height > q.maxHeight) {
			d.height = Ext.Number.constrain(d.height, q.minHeight, q.maxHeight);
			d.y = q.lastY || d.y
		} else {
			q.lastY = d.y
		}
		if (q.preserveRatio || p.shiftKey) {
			var m, j;
			g = q.startBox.width / q.startBox.height;
			m = Math.min(Math.max(q.minHeight, d.width / g), q.maxHeight);
			j = Math.min(Math.max(q.minWidth, d.height * g), q.maxWidth);
			if (b == 1) {
				d.height = m
			} else {
				if (b == 2) {
					d.width = j
				} else {
					s = Math.abs(h[0] - this.lastXY[0])
							/ Math.abs(h[1] - this.lastXY[1]);
					if (s > g) {
						d.height = m
					} else {
						d.width = j
					}
					if (c == "northeast") {
						d.y = i.y - (d.height - i.height)
					} else {
						if (c == "northwest") {
							d.y = i.y - (d.height - i.height);
							d.x = i.x - (d.width - i.width)
						} else {
							if (c == "southwest") {
								d.x = i.x - (d.width - i.width)
							}
						}
					}
				}
			}
		}
		if (r === 0) {
			o = "none"
		}
		if (n === 0) {
			l = "none"
		}
		q.resize(d, {
					horizontal : l,
					vertical : o
				}, k)
	},
	getResizeTarget : function(a) {
		return a ? this.target : this.getDynamicTarget()
	},
	resize : function(b, d, a) {
		var c = this.getResizeTarget(a);
		if (c.isComponent) {
			if (c.floating) {
				c.setPagePosition(b.x, b.y)
			}
			c.setSize(b.width, b.height)
		} else {
			c.setBox(b);
			if (this.originalTarget) {
				this.originalTarget.setBox(b)
			}
		}
	},
	onEnd : function(a) {
		this.updateDimensions(a, true);
		if (this.proxy) {
			this.proxy.hide()
		}
	}
});
Ext.define("Ext.resizer.SplitterTracker", {
	extend : "Ext.dd.DragTracker",
	requires : ["Ext.util.Region"],
	enabled : true,
	getPrevCmp : function() {
		var a = this.getSplitter();
		return a.previousSibling()
	},
	getNextCmp : function() {
		var a = this.getSplitter();
		return a.nextSibling()
	},
	onBeforeStart : function(c) {
		var b = this.getPrevCmp(), a = this.getNextCmp();
		if (a.collapsed || b.collapsed) {
			return false
		}
		this.prevBox = b.getEl().getBox();
		this.nextBox = a.getEl().getBox();
		this.constrainTo = this.calculateConstrainRegion()
	},
	onStart : function(b) {
		var a = this.getSplitter();
		a.addCls(a.baseCls + "-active")
	},
	calculateConstrainRegion : function() {
		var a = this.getSplitter(), l = 0, b = 0, g = a.getWidth(), h = a.defaultSplitMin, d = a.orientation, e = this.prevBox, i = this
				.getPrevCmp(), c = this.nextBox, f = this.getNextCmp(), k, j;
		if (d === "vertical") {
			k = Ext.create("Ext.util.Region", e.y, (i.maxWidth ? e.x
							+ i.maxWidth : c.right - (f.minWidth || h))
							+ g, e.bottom, e.x + (i.minWidth || h));
			j = Ext.create("Ext.util.Region", c.y, c.right - (f.minWidth || h),
					c.bottom, (f.maxWidth ? c.right - f.maxWidth : e.x
							+ (e.minWidth || h))
							- g)
		} else {
			k = Ext.create("Ext.util.Region", e.y + (i.minHeight || h),
					e.right, (i.maxHeight ? e.y + i.maxHeight : c.bottom
							- (f.minHeight || h))
							+ g, e.x);
			j = Ext.create("Ext.util.Region", (f.maxHeight ? c.bottom
							- f.maxHeight : e.y + (i.minHeight || h))
							- g, c.right, c.bottom - (f.minHeight || h), c.x)
		}
		return k.intersect(j)
	},
	performResize : function(h) {
		var i = this.getOffset("dragTarget"), g = this.getSplitter(), c = g.orientation, f = this
				.getPrevCmp(), b = this.getNextCmp(), a = g.ownerCt, d = a
				.getLayout();
		a.suspendLayout = true;
		if (c === "vertical") {
			if (f) {
				if (!f.maintainFlex) {
					delete f.flex;
					f.setSize(this.prevBox.width + i[0], f.getHeight())
				}
			}
			if (b) {
				if (!b.maintainFlex) {
					delete b.flex;
					b.setSize(this.nextBox.width - i[0], b.getHeight())
				}
			}
		} else {
			if (f) {
				if (!f.maintainFlex) {
					delete f.flex;
					f.setSize(f.getWidth(), this.prevBox.height + i[1])
				}
			}
			if (b) {
				if (!b.maintainFlex) {
					delete b.flex;
					b.setSize(f.getWidth(), this.nextBox.height - i[1])
				}
			}
		}
		delete a.suspendLayout;
		d.onLayout()
	},
	onEnd : function(b) {
		var a = this.getSplitter();
		a.removeCls(a.baseCls + "-active");
		this.performResize()
	},
	onDrag : function(d) {
		var f = this.getOffset("dragTarget"), c = this.getSplitter(), b = c
				.getEl(), a = c.orientation;
		if (a === "vertical") {
			b.setX(this.startRegion.left + f[0])
		} else {
			b.setY(this.startRegion.top + f[1])
		}
	},
	getSplitter : function() {
		return Ext.getCmp(this.getDragCt().id)
	}
});
Ext.define("Ext.ShadowPool", {
	singleton : true,
	requires : ["Ext.core.DomHelper"],
	markup : function() {
		if (Ext.supports.CSS3BoxShadow) {
			return '<div class="' + Ext.baseCSSPrefix
					+ 'css-shadow" role="presentation"></div>'
		} else {
			if (Ext.isIE) {
				return '<div class="' + Ext.baseCSSPrefix
						+ 'ie-shadow" role="presentation"></div>'
			} else {
				return '<div class="'
						+ Ext.baseCSSPrefix
						+ 'frame-shadow" role="presentation"><div class="xst" role="presentation"><div class="xstl" role="presentation"></div><div class="xstc" role="presentation"></div><div class="xstr" role="presentation"></div></div><div class="xsc" role="presentation"><div class="xsml" role="presentation"></div><div class="xsmc" role="presentation"></div><div class="xsmr" role="presentation"></div></div><div class="xsb" role="presentation"><div class="xsbl" role="presentation"></div><div class="xsbc" role="presentation"></div><div class="xsbr" role="presentation"></div></div></div>'
			}
		}
	}(),
	shadows : [],
	pull : function() {
		var a = this.shadows.shift();
		if (!a) {
			a = Ext.get(Ext.core.DomHelper.insertHtml("beforeBegin",
					document.body.firstChild, this.markup));
			a.autoBoxAdjust = false
		}
		return a
	},
	push : function(a) {
		this.shadows.push(a)
	},
	reset : function() {
		Ext.Array.each(this.shadows, function(a) {
					a.remove()
				});
		this.shadows = []
	}
});
Ext.define("Ext.Shadow", {
	requires : ["Ext.ShadowPool"],
	constructor : function(b) {
		Ext.apply(this, b);
		if (typeof this.mode != "string") {
			this.mode = this.defaultMode
		}
		var d = this.offset, c = {
			h : 0
		}, a = Math.floor(this.offset / 2);
		switch (this.mode.toLowerCase()) {
			case "drop" :
				if (Ext.supports.CSS3BoxShadow) {
					c.w = c.h = -d;
					c.l = c.t = d
				} else {
					c.w = 0;
					c.l = c.t = d;
					c.t -= 1;
					if (Ext.isIE) {
						c.l -= d + a;
						c.t -= d + a;
						c.w -= a;
						c.h -= a;
						c.t += 1
					}
				}
				break;
			case "sides" :
				if (Ext.supports.CSS3BoxShadow) {
					c.h -= d;
					c.t = d;
					c.l = c.w = 0
				} else {
					c.w = (d * 2);
					c.l = -d;
					c.t = d - 1;
					if (Ext.isIE) {
						c.l -= (d - a);
						c.t -= d + a;
						c.l += 1;
						c.w -= (d - a) * 2;
						c.w -= a + 1;
						c.h -= 1
					}
				}
				break;
			case "frame" :
				if (Ext.supports.CSS3BoxShadow) {
					c.l = c.w = c.t = 0
				} else {
					c.w = c.h = (d * 2);
					c.l = c.t = -d;
					c.t += 1;
					c.h -= 2;
					if (Ext.isIE) {
						c.l -= (d - a);
						c.t -= (d - a);
						c.l += 1;
						c.w -= (d + a + 1);
						c.h -= (d + a);
						c.h += 1
					}
					break
				}
		}
		this.adjusts = c
	},
	offset : 4,
	defaultMode : "drop",
	show : function(a) {
		a = Ext.get(a);
		if (!this.el) {
			this.el = Ext.ShadowPool.pull();
			if (this.el.dom.nextSibling != a.dom) {
				this.el.insertBefore(a)
			}
		}
		this.el.setStyle("z-index", this.zIndex
						|| parseInt(a.getStyle("z-index"), 10) - 1);
		if (Ext.isIE && !Ext.supports.CSS3BoxShadow) {
			this.el.dom.style.filter = "progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="
					+ (this.offset) + ")"
		}
		this.realign(a.getLeft(true), a.getTop(true), a.getWidth(), a
						.getHeight());
		this.el.dom.style.display = "block"
	},
	isVisible : function() {
		return this.el ? true : false
	},
	realign : function(b, o, k, g) {
		if (!this.el) {
			return
		}
		var a = this.adjusts, i = this.el.dom, j = i.style, c, f, m, e, h, n;
		j.left = (b + a.l) + "px";
		j.top = (o + a.t) + "px";
		c = Math.max(k + a.w, 0);
		f = Math.max(g + a.h, 0);
		h = c + "px";
		n = f + "px";
		if (j.width != h || j.height != n) {
			j.width = h;
			j.height = n;
			if (Ext.supports.CSS3BoxShadow) {
				j.boxShadow = "0 0 " + this.offset + "px 0 #888"
			} else {
				if (!Ext.isIE) {
					m = i.childNodes;
					e = Math.max(0, (c - 12)) + "px";
					m[0].childNodes[1].style.width = e;
					m[1].childNodes[1].style.width = e;
					m[2].childNodes[1].style.width = e;
					m[1].style.height = Math.max(0, (f - 12)) + "px"
				}
			}
		}
	},
	hide : function() {
		if (this.el) {
			this.el.dom.style.display = "none";
			Ext.ShadowPool.push(this.el);
			delete this.el
		}
	},
	setZIndex : function(a) {
		this.zIndex = a;
		if (this.el) {
			this.el.setStyle("z-index", a)
		}
	}
});
